/** * @covers \JaztecAcl\Acl\Acl::isAllowed */ public function testControlDetail() { // Testing special capabilities. $this->acl->deny(); $this->acl->allow('supermember'); $this->acl->allow('guest', 'resource05', 'index'); // Are is the right role permitted? $this->assertFalse($this->acl->isAllowed('guest', 'resource01'), 'The guest role is no longer allowed on this resource'); $this->assertFalse($this->acl->isAllowed('member', 'resource01'), 'A role derived from the guest role is no longer allowed on this resource'); $this->assertTrue($this->acl->isAllowed('supermember', 'resource01'), 'The ACL should allow this role because it as all rights.'); $this->assertTrue($this->acl->isAllowed('guest', 'resource05', 'index'), 'The ACL should allow this role with this privilege because it was directly set.'); }