From 6e5e32bef5762f7ebf7faa2e06a2cc4025365137 Mon Sep 17 00:00:00 2001 From: mark_story Date: Tue, 7 Sep 2010 23:40:07 -0400 Subject: [PATCH] Updating AclShell test to use AclComponent correctly. --- cake/console/libs/acl.php | 3 ++- cake/tests/cases/console/libs/acl.test.php | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/cake/console/libs/acl.php b/cake/console/libs/acl.php index 6627d1850..fde573223 100644 --- a/cake/console/libs/acl.php +++ b/cake/console/libs/acl.php @@ -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); } diff --git a/cake/tests/cases/console/libs/acl.test.php b/cake/tests/cases/console/libs/acl.test.php index 628a168b3..559e5eb3a 100644 --- a/cake/tests/cases/console/libs/acl.test.php +++ b/cake/tests/cases/console/libs/acl.test.php @@ -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'; }