Browse Source

Fix remaining deprecated method use in Response test.

Mark Story 8 years ago
parent
commit
359a60bbd8
2 changed files with 416 additions and 335 deletions
  1. 3 3
      src/Http/Response.php
  2. 413 332
      tests/TestCase/Http/ResponseTest.php

+ 3 - 3
src/Http/Response.php

@@ -452,7 +452,7 @@ class Response implements ResponseInterface
             $this->httpCodes($options['statusCodes']);
         }
         if (isset($options['status'])) {
-            $this->statusCode($options['status']);
+            $this->_setStatus($options['status']);
         }
         if (!isset($options['charset'])) {
             $options['charset'] = Configure::read('App.encoding');
@@ -1037,7 +1037,7 @@ class Response implements ResponseInterface
      */
     public function httpCodes($code = null)
     {
-        deprecationWarning('Will be removed in 4.0.0');
+        deprecationWarning('Response::httpCodes(). Will be removed in 4.0.0');
 
         if (empty($code)) {
             return $this->_statusCodes;
@@ -1680,8 +1680,8 @@ class Response implements ResponseInterface
      */
     public function notModified()
     {
-        $this->_status = 304;
         $this->_createStream();
+        $this->_setStatus(304);
 
         $remove = [
             'Allow',

File diff suppressed because it is too large
+ 413 - 332
tests/TestCase/Http/ResponseTest.php