mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46:17 +00:00
Updating ACL component test case, disproves ticket #4190
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6478 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
6615daa6b0
commit
3316731dd9
1 changed files with 10 additions and 1 deletions
|
@ -252,7 +252,16 @@ class AclComponentTest extends CakeTestCase {
|
|||
$result = $this->Acl->check('Secretary', 'Links', 'delete');
|
||||
$this->assertTrue($result);
|
||||
|
||||
$this->Acl->deny('Secretary','Links',array('delete'));
|
||||
$this->Acl->allow('Secretary','Links','read');
|
||||
$result = $this->Acl->Aro->Permission->find('all', array('conditions' => array('AroTest.alias' => 'Secretary')));
|
||||
$expected = array('id' => '2', 'aro_id' => '4', 'aco_id' => '15', '_create' => '1', '_read' => '1', '_update' => '', '_delete' => '');
|
||||
$this->assertEqual($result[0]['PermissionTest'], $expected);
|
||||
|
||||
$this->Acl->deny('Secretary','Links','delete');
|
||||
$expected['_delete'] = '-1';
|
||||
$result = $this->Acl->Aro->Permission->find('all', array('conditions' => array('AroTest.alias' => 'Secretary')));
|
||||
$this->assertEqual($result[0]['PermissionTest'], $expected);
|
||||
|
||||
$result = $this->Acl->check('Secretary','Links','delete');
|
||||
$this->assertFalse($result);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue