Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F6067863
GetunreadTest.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
GetunreadTest.php
View Options
<?php
namespace
Tests\Browser\Mail
;
class
GetunreadTest
extends
\Tests\Browser\TestCase
{
protected
static
$msgcount
=
0
;
public
static
function
setUpBeforeClass
()
{
\bootstrap
::
init_imap
();
\bootstrap
::
purge_mailbox
(
'INBOX'
);
// import email messages
foreach
(
glob
(
TESTS_DIR
.
'data/mail/list_??.eml'
)
as
$f
)
{
\bootstrap
::
import_message
(
$f
,
'INBOX'
);
self
::
$msgcount
++;
}
}
public
function
testGetunread
()
{
$this
->
browse
(
function
(
$browser
)
{
$browser
->
go
(
'mail'
);
$browser
->
waitFor
(
'#messagelist tbody tr'
);
// Messages list state
$browser
->
assertElementsCount
(
'#messagelist tbody tr.unread'
,
self
::
$msgcount
);
if
(!
$browser
->
isDesktop
())
{
$browser
->
click
(
'.back-sidebar-button'
);
}
// Folders list state
$browser
->
assertVisible
(
'.folderlist li.inbox.unread'
);
$this
->
assertEquals
(
strval
(
self
::
$msgcount
),
$browser
->
text
(
'.folderlist li.inbox span.unreadcount'
));
});
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Fri, May 22, 5:26 AM (13 h, 4 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
678604
Default Alt Text
GetunreadTest.php (1 KB)
Attached To
Mode
R3 roundcubemail
Attached
Detach File
Event Timeline
Log In to Comment