Skip to content

Commit

Permalink
Only enable headers_sent() for the tests that need it.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Nov 30, 2017
1 parent e2dfdd2 commit 2a3df60
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/TestCase/Http/ResponseTest.php
Expand Up @@ -46,7 +46,6 @@ public function setUp()
{
parent::setUp();
$this->server = $_SERVER;
$GLOBALS['mockedHeadersSent'] = false;
}

/**
Expand Down Expand Up @@ -394,6 +393,7 @@ public function testHeader()
*/
public function testSend()
{
$GLOBALS['mockedHeadersSent'] = false;
$this->deprecated(function () {
$response = $this->getMockBuilder('Cake\Http\Response')
->setMethods(['_sendHeader', '_sendContent'])
Expand Down Expand Up @@ -871,6 +871,7 @@ public function testOutputCompressed()
*/
public function testProtocol()
{
$GLOBALS['mockedHeadersSent'] = false;
$this->deprecated(function () {
$response = $this->getMockBuilder('Cake\Http\Response')
->setMethods(['_sendHeader', '_sendContent'])
Expand Down

0 comments on commit 2a3df60

Please sign in to comment.