Browse Source

Fix up headers_sent() handling for ServerTest.

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

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

@@ -42,7 +42,7 @@ class ServerTest extends TestCase
         $this->server = $_SERVER;
         $this->config = dirname(dirname(__DIR__));
         $GLOBALS['mockedHeaders'] = [];
-        $GLOBALS['mockedHeadersSent'] = false;
+        $GLOBALS['mockedHeadersSent'] = true;
     }
 
     /**
@@ -186,6 +186,7 @@ class ServerTest extends TestCase
      */
     public function testEmitCallbackStream()
     {
+        $GLOBALS['mockedHeadersSent'] = false;
         $response = new Response('php://memory', 200, ['x-testing' => 'source header']);
         $response = $response->withBody(new CallbackStream(function () {
             echo 'body content';