mirror of
https://github.com/retailcrm/Fetch.git
synced 2024-11-29 05:56:02 +03:00
updated test to encompass new numMessages syntax
This commit is contained in:
parent
9c3fe885e8
commit
53b3aabca0
@ -175,16 +175,14 @@ class MessageTest extends \PHPUnit_Framework_TestCase
|
|||||||
// Testing by moving message from "Test Folder" to "Sent"
|
// Testing by moving message from "Test Folder" to "Sent"
|
||||||
|
|
||||||
// Count Test Folder
|
// Count Test Folder
|
||||||
$server->setMailBox('Test Folder');
|
$testFolderNumStart = $server->numMessages('Test Folder');
|
||||||
$testFolderNumStart = $server->numMessages();
|
|
||||||
|
|
||||||
// Get message from Test Folder
|
// Get message from Test Folder
|
||||||
$message = $server->getMessageByUid(1);
|
$message = $server->getMessageByUid(1);
|
||||||
$this->assertInstanceOf('\Fetch\Message', $message, 'Server returned Message.');
|
$this->assertInstanceOf('\Fetch\Message', $message, 'Server returned Message.');
|
||||||
|
|
||||||
// Switch to Sent folder, count messages
|
// Switch to Sent folder, count messages
|
||||||
$server->setMailBox('Sent');
|
$sentFolderNumStart = $server->numMessages('Sent');
|
||||||
$sentFolderNumStart = $server->numMessages();
|
|
||||||
|
|
||||||
// Switch to "Flagged" folder in order to test that function properly returns to it
|
// Switch to "Flagged" folder in order to test that function properly returns to it
|
||||||
$this->assertTrue($server->setMailBox('Flagged Email'));
|
$this->assertTrue($server->setMailBox('Flagged Email'));
|
||||||
@ -199,11 +197,11 @@ class MessageTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
// Make sure Test Folder lost a message
|
// Make sure Test Folder lost a message
|
||||||
$this->assertTrue($server->setMailBox('Test Folder'));
|
$this->assertTrue($server->setMailBox('Test Folder'));
|
||||||
$this->assertEquals($testFolderNumStart - 1, $server->numMessages(), 'Message moved out of Test Folder.');
|
$this->assertEquals($testFolderNumStart - 1, $server->numMessages('Test Folder'), 'Message moved out of Test Folder.');
|
||||||
|
|
||||||
// Make sure Sent folder gains one
|
// Make sure Sent folder gains one
|
||||||
$this->assertTrue($server->setMailBox('Sent'));
|
$this->assertTrue($server->setMailBox('Sent'));
|
||||||
$this->assertEquals($sentFolderNumStart + 1, $server->numMessages(), 'Message moved into Sent Folder.');
|
$this->assertEquals($sentFolderNumStart + 1, $server->numMessages('Sent'), 'Message moved into Sent Folder.');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testDecode()
|
public function testDecode()
|
||||||
|
Loading…
Reference in New Issue
Block a user