Returns whether rule is a privilege or a restriction
public getBehavior ( ) : boolean | ||
리턴 | boolean |
public function testCanBeSetToAllowOrDeny() { $allowed_rule = new Rule(true, 'read', m::mock('Obj')); $denied_rule = new Rule(false, 'write', m::mock('Obj')); $this->assertTrue($allowed_rule->getBehavior()); $this->assertTrue($allowed_rule->isPrivilege()); $this->assertFalse($denied_rule->getBehavior()); $this->assertTrue($denied_rule->isRestriction()); }