From 53b3aabca070b04e351b444a93f80a785128408e Mon Sep 17 00:00:00 2001 From: Lewis Cowles Date: Sun, 24 May 2015 10:46:32 +0100 Subject: [PATCH] updated test to encompass new numMessages syntax --- tests/Fetch/Test/MessageTest.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tests/Fetch/Test/MessageTest.php b/tests/Fetch/Test/MessageTest.php index 970cd30..d65ae7f 100644 --- a/tests/Fetch/Test/MessageTest.php +++ b/tests/Fetch/Test/MessageTest.php @@ -175,16 +175,14 @@ class MessageTest extends \PHPUnit_Framework_TestCase // Testing by moving message from "Test Folder" to "Sent" // Count Test Folder - $server->setMailBox('Test Folder'); - $testFolderNumStart = $server->numMessages(); + $testFolderNumStart = $server->numMessages('Test Folder'); // Get message from Test Folder $message = $server->getMessageByUid(1); $this->assertInstanceOf('\Fetch\Message', $message, 'Server returned Message.'); // Switch to Sent folder, count messages - $server->setMailBox('Sent'); - $sentFolderNumStart = $server->numMessages(); + $sentFolderNumStart = $server->numMessages('Sent'); // Switch to "Flagged" folder in order to test that function properly returns to it $this->assertTrue($server->setMailBox('Flagged Email')); @@ -199,11 +197,11 @@ class MessageTest extends \PHPUnit_Framework_TestCase // Make sure Test Folder lost a message $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 $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()