From 79d288ba2bfb5b9688a401b36580f7c6552f0c0f Mon Sep 17 00:00:00 2001 From: Jose Lorenzo Rodriguez Date: Sat, 13 Sep 2014 15:30:05 +0200 Subject: [PATCH] Fixing failing tests --- src/Network/Response.php | 3 +-- tests/TestCase/Network/ResponseTest.php | 3 +-- tests/TestCase/Network/mocks.php | 28 +++++++++++++++++++++++++ 3 files changed, 30 insertions(+), 4 deletions(-) create mode 100644 tests/TestCase/Network/mocks.php diff --git a/src/Network/Response.php b/src/Network/Response.php index a505506717f..3d3aafd954c 100644 --- a/src/Network/Response.php +++ b/src/Network/Response.php @@ -442,9 +442,8 @@ public function sendHeaders() { return; } - $this->_setCookies(); - $codeMessage = $this->_statusCodes[$this->_status]; + $this->_setCookies(); $this->_sendHeader("{$this->_protocol} {$this->_status} {$codeMessage}"); $this->_setContentType(); diff --git a/tests/TestCase/Network/ResponseTest.php b/tests/TestCase/Network/ResponseTest.php index 137a7ac0551..102c291257f 100644 --- a/tests/TestCase/Network/ResponseTest.php +++ b/tests/TestCase/Network/ResponseTest.php @@ -31,7 +31,7 @@ class ResponseTest extends TestCase { */ public function setUp() { parent::setUp(); - ob_start(); + include_once __DIR__ . DS . 'mocks.php'; } /** @@ -41,7 +41,6 @@ public function setUp() { */ public function tearDown() { parent::tearDown(); - ob_end_clean(); } /** diff --git a/tests/TestCase/Network/mocks.php b/tests/TestCase/Network/mocks.php new file mode 100644 index 00000000000..eb3381c761e --- /dev/null +++ b/tests/TestCase/Network/mocks.php @@ -0,0 +1,28 @@ +