Updating AclShell test to use AclComponent correctly.

This commit is contained in:
mark_story 2010-09-07 23:40:07 -04:00
parent 4ff52da57e
commit 6e5e32bef5
2 changed files with 5 additions and 3 deletions

View file

@ -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);
}

View file

@ -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';
}