mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46:17 +00:00
updating auth test, closes #4398
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6620 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
af2228216f
commit
1346224b1f
1 changed files with 9 additions and 8 deletions
|
@ -258,27 +258,28 @@ class AuthTest extends CakeTestCase {
|
|||
$result = $this->Controller->Acl->Aro->save();
|
||||
$this->assertTrue($result);
|
||||
|
||||
$this->Controller->Acl->Aro->create(array('alias'=>'Admin'));
|
||||
$parent = $this->Controller->Acl->Aro->id;
|
||||
|
||||
$this->Controller->Acl->Aro->create(array('parent_id'=> $parent, 'alias'=>'Admin'));
|
||||
$result = $this->Controller->Acl->Aro->save();
|
||||
$this->assertTrue($result);
|
||||
|
||||
$this->Controller->Acl->Aro->create(array('model'=>'AuthUser', 'foreign_key'=>'1', 'alias'=> 'mariano'));
|
||||
$parent = $this->Controller->Acl->Aro->id;
|
||||
|
||||
$this->Controller->Acl->Aro->create(array('model' => 'AuthUser', 'parent_id' => $parent, 'foreign_key' => 1, 'alias'=> 'mariano'));
|
||||
$result = $this->Controller->Acl->Aro->save();
|
||||
$this->assertTrue($result);
|
||||
|
||||
$this->Controller->Acl->Aro->setParent(1, 2);
|
||||
$this->Controller->Acl->Aro->setParent(2, 3);
|
||||
|
||||
$this->Controller->Acl->Aco->create(array('alias'=>'Root'));
|
||||
$result = $this->Controller->Acl->Aco->save();
|
||||
$this->assertTrue($result);
|
||||
|
||||
$this->Controller->Acl->Aco->create(array('alias'=>'AuthTest'));
|
||||
$parent = $this->Controller->Acl->Aco->id;
|
||||
|
||||
$this->Controller->Acl->Aco->create(array('parent_id' => $parent, 'alias' => 'AuthTest'));
|
||||
$result = $this->Controller->Acl->Aco->save();
|
||||
$this->assertTrue($result);
|
||||
|
||||
$this->Controller->Acl->Aco->setParent(1, 2);
|
||||
|
||||
$this->Controller->Acl->allow('Roles/Admin', 'Root');
|
||||
$this->Controller->Acl->allow('Roles/Admin', 'Root/AuthTest');
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue