Skip to content
Permalink
Browse files

fix failing tests

fixing...
  • Loading branch information...
highstrike committed Jun 25, 2015
1 parent 8257100 commit a9d77d26f036fcb964071e485343c81d1656c57d
@@ -197,7 +197,6 @@ public function testBakeEmptyFlag() {
'Test' . DS . 'Case' . DS . 'View' . DS . 'Helper' => 'empty',
'Test' . DS . 'Fixture' => 'empty',
'Vendor' => 'empty',
'View' . DS . 'Elements' => 'empty',
'View' . DS . 'Scaffolds' => 'empty',
'tmp' . DS . 'cache' . DS . 'models' => 'empty',
'tmp' . DS . 'cache' . DS . 'persistent' => 'empty',
@@ -165,7 +165,7 @@ class AuthTestController extends Controller {
*
* @var array
*/
public $components = array('Session', 'Auth');
public $components = array('Session', 'Flash', 'Auth');
/**
* testUrl property
@@ -1093,9 +1093,9 @@ public function testRedirectToUnauthorizedRedirect() {
array('on', 'redirect'),
array($CakeRequest, $CakeResponse)
);
$this->Auth->Session = $this->getMock(
'SessionComponent',
array('setFlash'),
$this->Auth->Flash = $this->getMock(
'FlashComponent',
array('set'),
array($Controller->Components)
);
@@ -1105,8 +1105,8 @@ public function testRedirectToUnauthorizedRedirect() {
$Controller->expects($this->once())
->method('redirect')
->with($this->equalTo($expected));
$this->Auth->Session->expects($this->once())
->method('setFlash');
$this->Auth->Flash->expects($this->once())
->method('set');
$this->Auth->startup($Controller);
}
@@ -1132,9 +1132,9 @@ public function testRedirectToUnauthorizedRedirectSuppressedAuthError() {
array('on', 'redirect'),
array($CakeRequest, $CakeResponse)
);
$this->Auth->Session = $this->getMock(
'SessionComponent',
array('setFlash'),
$this->Auth->Flash = $this->getMock(
'FlashComponent',
array('set'),
array($Controller->Components)
);
@@ -1144,8 +1144,8 @@ public function testRedirectToUnauthorizedRedirectSuppressedAuthError() {
$Controller->expects($this->once())
->method('redirect')
->with($this->equalTo($expected));
$this->Auth->Session->expects($this->never())
->method('setFlash');
$this->Auth->Flash->expects($this->never())
->method('set');
$this->Auth->startup($Controller);
}
@@ -1514,10 +1514,10 @@ public function testLoginWithUserData() {
* @return void
*/
public function testFlashSettings() {
$this->Auth->Session = $this->getMock('SessionComponent', array(), array(), '', false);
$this->Auth->Session->expects($this->once())
->method('setFlash')
->with('Auth failure', 'custom', array(1), 'auth-key');
$this->Auth->Flash = $this->getMock('FlashComponent', array(), array(), '', false);
$this->Auth->Flash->expects($this->once())
->method('set')
->with('Auth failure', array('element' => 'custom', 'params' => array(1), 'key' => 'auth-key'));
$this->Auth->flash = array(
'element' => 'custom',

0 comments on commit a9d77d2

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