From 741a9eabc15d83c76382642ec59e8bc19dcc3d9b Mon Sep 17 00:00:00 2001 From: Robert Hafner Date: Wed, 7 Jan 2015 19:18:16 -0800 Subject: [PATCH] Changed function names for cs consistency --- src/Fetch/Server.php | 4 ++-- tests/Fetch/Test/ServerTest.php | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Fetch/Server.php b/src/Fetch/Server.php index 38d2bcb..5368781 100644 --- a/src/Fetch/Server.php +++ b/src/Fetch/Server.php @@ -382,7 +382,7 @@ class Server * @param int $limit * @return Message[] */ - public function getOrdered($orderBy, $reverse, $limit) + public function getOrderedMessages($orderBy, $reverse, $limit) { $msgIds = imap_sort($this->getImapStream(), $orderBy, $reverse ? 1 : 0, SE_UID); @@ -451,7 +451,7 @@ class Server * * @return array */ - public function listMailbox($pattern = '*') + public function listMailBoxes($pattern = '*') { return imap_list($this->getImapStream(), $this->getServerSpecification(), $pattern); } diff --git a/tests/Fetch/Test/ServerTest.php b/tests/Fetch/Test/ServerTest.php index 6044c4b..d9875a6 100644 --- a/tests/Fetch/Test/ServerTest.php +++ b/tests/Fetch/Test/ServerTest.php @@ -116,7 +116,7 @@ class ServerTest extends \PHPUnit_Framework_TestCase public function testGetMessagesOrderedByDateAsc() { $server = static::getServer(); - $messages = $server->getOrdered(SORTDATE, false, 2); + $messages = $server->getOrderedMessages(SORTDATE, false, 2); $this->assertCount(2, $messages, 'Two messages returned'); $this->assertGreaterThan($messages[0]->getDate(), $messages[1]->getDate(), 'Messages in ascending order'); @@ -125,7 +125,7 @@ class ServerTest extends \PHPUnit_Framework_TestCase public function testGetMessagesOrderedByDateDesc() { $server = static::getServer(); - $messages = $server->getOrdered(SORTDATE, true, 2); + $messages = $server->getOrderedMessages(SORTDATE, true, 2); $this->assertCount(2, $messages, 'Two messages returned'); $this->assertLessThan($messages[0]->getDate(), $messages[1]->getDate(), 'Messages in descending order'); @@ -164,12 +164,12 @@ class ServerTest extends \PHPUnit_Framework_TestCase $this->assertFalse($server->hasMailBox('Cheese'), 'Does not have mailbox "Cheese"'); } - public function testListMailbox() + public function testListMailBoxes() { $server = static::getServer(); $spec = sprintf('{%s:143/novalidate-cert}', TESTING_SERVER_HOST); - $list = $server->listMailbox('*'); + $list = $server->listMailboxes('*'); $this->assertContains($spec.'Sent', $list, 'Has mailbox "Sent"'); $this->assertNotContains($spec.'Cheese', $list, 'Does not have mailbox "Cheese"'); }