Permalink
Browse files

Adding test case for previous commit

  • Loading branch information...
lorenzo committed Oct 28, 2011
1 parent 29ca42e commit 8945dcbf576e96074729fedcd971ce7586e01f0d
Showing with 8 additions and 0 deletions.
  1. +8 −0 lib/Cake/Test/Case/Network/CakeResponseTest.php
@@ -416,5 +416,13 @@ public function testSendContentLength() {
$response->expects($this->at(2))
->method('_sendHeader')->with('Content-Length', 1);
$response->send();
+
+ $response = $this->getMock('CakeResponse', array('_sendHeader', '_sendContent'));
+ $body = 'content';
+ $response->statusCode(301);
+ $response->body($body);
+ $response->expects($this->once())->method('_sendContent')->with($body);
+ $response->expects($this->exactly(2))->method('_sendHeader');
+ $response->send();
}
}

0 comments on commit 8945dcb

Please sign in to comment.