Skip to content

Commit

Permalink
Made the getServer function static
Browse files Browse the repository at this point in the history
  • Loading branch information
tedivm committed Dec 6, 2013
1 parent 9c6a141 commit f7436ee
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/Fetch/Test/ServerTest.php
Expand Up @@ -82,14 +82,14 @@ public function connectionDataProvider() {

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');
Expand All @@ -100,7 +100,7 @@ public function testGetMessages()

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"');
Expand All @@ -109,16 +109,16 @@ public function testHasMailBox()

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.');
$this->assertTrue($server->hasMailBox('Cheese'), 'Mailbox "Cheese" was created');
}



public function getServer()

static public function getServer()
{
$server = new Server(TESTING_SERVER_HOST, 143);
$server->setAuthentication(TEST_USER, TEST_PASSWORD);
Expand Down

0 comments on commit f7436ee

Please sign in to comment.