Kohana v3.3.5
This commit is contained in:
@@ -171,27 +171,6 @@ class Kohana_ResponseTest extends Unittest_TestCase
|
||||
$this->assertSame(Cookie::$expiration, $cookie['expiration']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests that the headers are not sent by PHP in CLI mode
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function test_send_headers_cli()
|
||||
{
|
||||
if (headers_sent())
|
||||
{
|
||||
$this->markTestSkipped('Cannot test this feature as headers have already been sent!');
|
||||
}
|
||||
|
||||
$content_type = 'application/json';
|
||||
$response = new Response;
|
||||
$response->headers('content-type', $content_type)
|
||||
->send_headers();
|
||||
|
||||
$this->assertFalse(headers_sent());
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the content type is sent when set
|
||||
*
|
||||
@@ -205,4 +184,4 @@ class Kohana_ResponseTest extends Unittest_TestCase
|
||||
$headers = $response->send_headers()->headers();
|
||||
$this->assertSame($content_type, (string) $headers['content-type']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user