Skip to content
Permalink
Browse files

Fixing failing tests

  • Loading branch information...
lorenzo committed Sep 13, 2014
1 parent 07e1b67 commit 79d288ba2bfb5b9688a401b36580f7c6552f0c0f
Showing with 30 additions and 4 deletions.
  1. +1 −2 src/Network/Response.php
  2. +1 −2 tests/TestCase/Network/ResponseTest.php
  3. +28 −0 tests/TestCase/Network/mocks.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();
@@ -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();
}
/**
@@ -0,0 +1,28 @@
<?php
/**
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @since 3.0.0
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
namespace Cake\Network {
/**
* Mocks the headers_sent() function when invoked from the Cake\Network
* namespace so that it always return false
*
* @return boolean
*/
function headers_sent() {
return false;
}
}

0 comments on commit 79d288b

Please sign in to comment.
You can’t perform that action at this time.