Skip to content

Commit

Permalink
Some test cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
aperdomo committed Mar 28, 2016
1 parent b190277 commit 8afe1ae
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
13 changes: 11 additions & 2 deletions tests/Message/AuthorizeRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public function setUp()
);
}

public function testAuthorizeSuccess()
public function testSendSuccess()
{
$this->setMockHttpResponse('AuthorizeRequestSuccess.txt');
$response = $this->request->send();
Expand All @@ -29,7 +29,16 @@ public function testAuthorizeSuccess()
$this->assertSame('Approved', $response->getMessage());
}

public function testAuthorizeInsufficentFunds()
public function testAuthorizeSendError()
{
$this->setMockHttpResponse('NoMessageNoResponseCodeFailure.txt');
$response = $this->request->send();
$this->assertFalse($response->isSuccessful());
$this->assertNull($response->getMessage());
$this->assertNull($response->getResponseCode());
}

public function testSendInsufficentFunds()
{
$this->setMockHttpResponse('AuthorizeRequestInsufficientFunds.txt');
$response = $this->request->send();
Expand Down
9 changes: 9 additions & 0 deletions tests/Message/PurchaseRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,15 @@ public function testSendSuccess()
}

public function testSendError()
{
$this->setMockHttpResponse('NoMessageNoResponseCodeFailure.txt');
$response = $this->request->send();
$this->assertFalse($response->isSuccessful());
$this->assertNull($response->getMessage());
$this->assertNull($response->getResponseCode());
}

public function testSendFailure()
{
$this->setMockHttpResponse('PurchaseRequestFailure.txt');
$response = $this->request->send();
Expand Down

0 comments on commit 8afe1ae

Please sign in to comment.