mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Updating AclShell test to use AclComponent correctly.
This commit is contained in:
parent
4ff52da57e
commit
6e5e32bef5
2 changed files with 5 additions and 3 deletions
|
@ -91,7 +91,8 @@ class AclShell extends Shell {
|
|||
require_once (CONFIGS.'database.php');
|
||||
|
||||
if (!in_array($this->command, array('initdb'))) {
|
||||
$this->Acl =& new AclComponent();
|
||||
$collection = new ComponentCollection();
|
||||
$this->Acl =& new AclComponent($collection);
|
||||
$controller = null;
|
||||
$this->Acl->startup($controller);
|
||||
}
|
||||
|
|
|
@ -63,7 +63,7 @@ class AclShellTest extends CakeTestCase {
|
|||
Configure::write('Acl.classname', 'DbAcl');
|
||||
|
||||
$this->Dispatcher = $this->getMock(
|
||||
'ShellDispather',
|
||||
'ShellDispatcher',
|
||||
array('getInput', 'stdout', 'stderr', '_stop', '_initEnvironment', 'dispatch')
|
||||
);
|
||||
$this->Task = $this->getMock(
|
||||
|
@ -71,7 +71,8 @@ class AclShellTest extends CakeTestCase {
|
|||
array('in', 'out', 'hr', 'createFile', 'error', 'err'),
|
||||
array(&$this->Dispatcher)
|
||||
);
|
||||
$this->Task->Acl = new AclComponent();
|
||||
$collection = new ComponentCollection();
|
||||
$this->Task->Acl = new AclComponent($collection);
|
||||
|
||||
$this->Task->params['datasource'] = 'test_suite';
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue