Skip to content
Permalink
Browse files

Mocking _sendHeader instead of send()

  • Loading branch information...
davidsteinsland committed Jul 22, 2014
1 parent d98abc5 commit 6e777a54a3804585ff4f4bc266a74f8a196df13e
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/Cake/Test/Case/Controller/Component/AuthComponentTest.php
@@ -1174,8 +1174,10 @@ public function testAjaxLoginResponseCode() {
Router::setRequestInfo($this->Auth->request);
$this->Controller->response = $this->getMock('CakeResponse', array('send'));
$this->Controller->response->expects($this->once())->method('send');
$this->Controller->response = $this->getMock('CakeResponse', array('_sendHeader'));
$this->Controller->response->expects($this->at(0))
->method('_sendHeader')
->with('HTTP/1.1 403 Forbidden', null);
$this->Auth->initialize($this->Controller);
$result = $this->Auth->startup($this->Controller);

0 comments on commit 6e777a5

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