Acl\Test\TestCase\AclExtrasTestCase::testAcoSyncRemoveMethods PHP Метод

testAcoSyncRemoveMethods() публичный Метод

test syncing of Aco records
public testAcoSyncRemoveMethods ( ) : void
Результат void
    public function testAcoSyncRemoveMethods()
    {
        $this->_clean();
        $this->_setup();
        $this->Task->acoUpdate();
        $Aco = $this->Task->Acl->Aco;
        $Aco->cacheQueries = false;
        $basic = $this->_createNode('controllers/Comments', 4);
        $adminPosts = $this->_createNode('controllers/Admin/Posts', 4);
        $this->Task->acoSync();
        $children = $Aco->find('children', ['for' => $basic[0]['id']])->toArray();
        $this->assertEquals(count($children), 3);
        $children = $Aco->find('children', ['for' => $adminPosts[0]['id']])->toArray();
        $this->assertEquals(count($children), 3);
        $method = $Aco->node('controllers/Comments/someMethod');
        $this->assertFalse($method);
        $method = $Aco->node('controllers/Admin/Posts/otherMethod');
        $this->assertFalse($method);
    }