Skip to content
Permalink
Browse files

Use PSR7 interface method instead of deprecated one.

Always using the PSR7 interface method makes testing apps with
middleware that generate their own responses work.
  • Loading branch information...
markstory committed Dec 1, 2016
1 parent a906025 commit 6eb08ce5671edc9d23eb47003697267273a5369b
Showing with 5 additions and 2 deletions.
  1. +2 −2 src/TestSuite/IntegrationTestCase.php
  2. +3 −0 tests/TestCase/TestSuite/IntegrationTestCaseTest.php
@@ -659,7 +659,7 @@ public function assertResponseFailure()
*/
public function assertResponseCode($code)
{
$actual = $this->_response->statusCode();
$actual = $this->_response->getStatusCode();
$this->_assertStatus($code, $code, 'Status code is not ' . $code . ' but ' . $actual);
}
@@ -676,7 +676,7 @@ protected function _assertStatus($min, $max, $message)
if (!$this->_response) {
$this->fail('No response set, cannot assert status code.');
}
$status = $this->_response->statusCode();
$status = $this->_response->getStatusCode();
if ($this->_exception && ($status < $min || $status > $max)) {
$this->fail($this->_exception);
@@ -44,6 +44,9 @@ public function setUp()
DispatcherFactory::add('Routing');
DispatcherFactory::add('ControllerFactory');
$this->useHttpServer(false);
// Load aliases, or tests fail in isolation.
class_exists('Cake\Network\Request');
}
/**

0 comments on commit 6eb08ce

Please sign in to comment.
You can’t perform that action at this time.