mirror of
https://github.com/retailcrm/Fetch.git
synced 2024-11-22 11:16:03 +03:00
Made the getServer function static
This commit is contained in:
parent
9c6a14134b
commit
f7436eee00
@ -82,14 +82,14 @@ class ServerTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function testNumMessages()
|
||||
{
|
||||
$server = $this->getServer();
|
||||
$server = Static::getServer();
|
||||
$numMessages = $server->numMessages();
|
||||
$this->assertEquals(21, $numMessages);
|
||||
}
|
||||
|
||||
public function testGetMessages()
|
||||
{
|
||||
$server = $this->getServer();
|
||||
$server = Static::getServer();
|
||||
$messages = $server->getMessages(5);
|
||||
|
||||
$this->assertCount(5, $messages, 'Five messages returned');
|
||||
@ -100,7 +100,7 @@ class ServerTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function testHasMailBox()
|
||||
{
|
||||
$server = $this->getServer();
|
||||
$server = Static::getServer();
|
||||
|
||||
$this->assertTrue($server->hasMailBox('Sent'), 'Has mailbox "Sent"');
|
||||
$this->assertTrue($server->hasMailBox('Flagged Emails'), 'Has mailbox "Flagged Email"');
|
||||
@ -109,7 +109,7 @@ class ServerTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function testCreateMailbox()
|
||||
{
|
||||
$server = $this->getServer();
|
||||
$server = Static::getServer();
|
||||
|
||||
$this->assertFalse($server->hasMailBox('Cheese'), 'Does not have mailbox "Cheese"');
|
||||
$this->assertTrue($server->createMailBox('Cheese'), 'createMailbox returns true.');
|
||||
@ -118,7 +118,7 @@ class ServerTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
|
||||
|
||||
public function getServer()
|
||||
static public function getServer()
|
||||
{
|
||||
$server = new Server(TESTING_SERVER_HOST, 143);
|
||||
$server->setAuthentication(TEST_USER, TEST_PASSWORD);
|
||||
|
Loading…
Reference in New Issue
Block a user