Acl\Test\TestCase\AclExtrasTestCase::testAcoUpdateAddingMethods PHP Méthode

testAcoUpdateAddingMethods() public méthode

test adding methods with acoUpdate
public testAcoUpdateAddingMethods ( ) : void
Résultat void
    public function testAcoUpdateAddingMethods()
    {
        $this->_clean();
        $this->_setup();
        $this->Task->acoUpdate();
        $Aco = $this->Task->Acl->Aco;
        $Aco->cacheQueries = false;
        $result = $Aco->node('controllers/Comments')->toArray();
        $children = $Aco->find('children', ['for' => $result[0]['id']])->toArray();
        $this->assertEquals(count($children), 3);
        $Aco->delete($children[0]);
        $Aco->delete($children[1]);
        $this->Task->acoUpdate();
        $children = $Aco->find('children', ['for' => $result[0]['id']])->toArray();
        $this->assertEquals(count($children), 3);
    }