mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
fix failing tests
fixing...
This commit is contained in:
parent
8257100f54
commit
a9d77d26f0
2 changed files with 15 additions and 16 deletions
|
@ -197,7 +197,6 @@ class ProjectTaskTest extends CakeTestCase {
|
|||
'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 @@ class AuthComponentTest extends CakeTestCase {
|
|||
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 @@ class AuthComponentTest extends CakeTestCase {
|
|||
$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 @@ class AuthComponentTest extends CakeTestCase {
|
|||
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 @@ class AuthComponentTest extends CakeTestCase {
|
|||
$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 @@ class AuthComponentTest extends CakeTestCase {
|
|||
* @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',
|
||||
|
|
Loading…
Reference in a new issue