Browse Source

Only enable headers_sent() for the tests that need it.

Mark Story 8 years ago
parent
commit
2a3df60bed
1 changed files with 2 additions and 1 deletions
  1. 2 1
      tests/TestCase/Http/ResponseTest.php

+ 2 - 1
tests/TestCase/Http/ResponseTest.php

@@ -46,7 +46,6 @@ class ResponseTest extends TestCase
     {
         parent::setUp();
         $this->server = $_SERVER;
-        $GLOBALS['mockedHeadersSent'] = false;
     }
 
     /**
@@ -394,6 +393,7 @@ class ResponseTest extends TestCase
      */
     public function testSend()
     {
+        $GLOBALS['mockedHeadersSent'] = false;
         $this->deprecated(function () {
             $response = $this->getMockBuilder('Cake\Http\Response')
                 ->setMethods(['_sendHeader', '_sendContent'])
@@ -871,6 +871,7 @@ class ResponseTest extends TestCase
      */
     public function testProtocol()
     {
+        $GLOBALS['mockedHeadersSent'] = false;
         $this->deprecated(function () {
             $response = $this->getMockBuilder('Cake\Http\Response')
                 ->setMethods(['_sendHeader', '_sendContent'])