Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Allow testing of a specific status code.
  • Loading branch information
euromark committed Dec 14, 2014
1 parent d6f63ac commit b872912
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/TestSuite/IntegrationTestCase.php
Expand Up @@ -371,6 +371,16 @@ public function assertResponseFailure() {
$this->_assertStatus(500, 505, 'Status code is not between 500 and 505');
}

/**
* Assert a specific response status code.
*
* @return void
*/
public function assertResponse($code) {
$actual = $this->_response->statusCode();
$this->_assertStatus($code, $code, 'Status code is not ' . $code . ' but ' . $actual);
}

/**
* Helper method for status assertions.
*
Expand Down

0 comments on commit b872912

Please sign in to comment.