Merge pull request #109 from tedious/release-0.6.1

Changed function names for cs consistency
This commit is contained in:
Robert Hafner 2015-01-07 19:22:20 -08:00
commit 154a84fdfa
2 changed files with 6 additions and 6 deletions

View File

@ -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);
}

View File

@ -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"');
}