Skip to content

Commit

Permalink
Merge pull request #109 from tedious/release-0.6.1
Browse files Browse the repository at this point in the history
Changed function names for cs consistency
  • Loading branch information
tedivm committed Jan 8, 2015
2 parents 08ff0ca + 741a9ea commit 154a84f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/Fetch/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ public function getMessages($limit = null)
* @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);

Expand Down Expand Up @@ -451,7 +451,7 @@ public function createMailBox($mailbox)
*
* @return array
*/
public function listMailbox($pattern = '*')
public function listMailBoxes($pattern = '*')
{
return imap_list($this->getImapStream(), $this->getServerSpecification(), $pattern);
}
Expand Down
8 changes: 4 additions & 4 deletions tests/Fetch/Test/ServerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public function testGetMessages()
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');
Expand All @@ -125,7 +125,7 @@ public function testGetMessagesOrderedByDateAsc()
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');
Expand Down Expand Up @@ -164,12 +164,12 @@ public function testHasMailBox()
$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"');
}
Expand Down

0 comments on commit 154a84f

Please sign in to comment.