mirror of
https://github.com/retailcrm/Fetch.git
synced 2024-11-21 18:56:02 +03:00
Changed function names for cs consistency
This commit is contained in:
parent
08ff0caa1c
commit
741a9eabc1
@ -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);
|
||||
}
|
||||
|
@ -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"');
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user