Skip to content
Permalink
Browse files

Adding an Acl property to AuthComponent and updating tests to use new…

… API's
  • Loading branch information...
markstory committed Jul 31, 2010
1 parent c6a63ba commit f5bebc9306a9050923a859f136c7be4e2dd13ee5
@@ -254,6 +254,13 @@ class AuthComponent extends Component {
*/
public $params = array();
/**
* AclComponent instance if using Acl + Auth
*
* @var AclComponent
*/
public $Acl;
/**
* Method list for bound controller
*
@@ -490,7 +490,7 @@ function setUp() {
$this->Controller = new AuthTestController();
$this->Controller->Components->init($this->Controller);
$this->Controller->Components->initialize($this->Controller);
$this->Controller->Components->trigger('initialize', array(&$this->Controller));
$this->Controller->beforeFilter();
ClassRegistry::addObject('view', new View($this->Controller));
@@ -800,7 +800,7 @@ function testAuthorizeActions() {
$this->Controller->params['controller'] = 'auth_test';
$this->Controller->params['action'] = 'add';
$this->Controller->Acl = $this->getMock('AclComponent');
$this->Controller->Acl = $this->getMock('AclComponent', array(), array(), '', false);
$this->Controller->Acl->expects($this->atLeastOnce())->method('check')->will($this->returnValue(true));
$this->Controller->Auth->initialize($this->Controller);
@@ -1552,7 +1552,7 @@ function testComponentSettings() {
'Session'
);
$this->Controller->Components->init($this->Controller);
$this->Controller->Components->initialize($this->Controller);
$this->Controller->Components->trigger('initialize', array(&$this->Controller));
Router::reload();
$this->AuthUserCustomField = new AuthUserCustomField();

0 comments on commit f5bebc9

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