Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F117886762
GetunreadTest.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
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
Mon, Apr 6, 2:40 AM (2 w, 3 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18832094
Default Alt Text
GetunreadTest.php (1 KB)
Attached To
Mode
R113 roundcubemail
Attached
Detach File
Event Timeline