Psecio\PropAuth\EnforcerTest::testAllowsSubjectInvalid PHP Method

testAllowsSubjectInvalid() public method

Test that a false is returned when the user is not allowed by the policy
    public function testAllowsSubjectInvalid()
    {
        $policy = Policy::instance()->hasUsername('notrightuser');
        $policySet = PolicySet::instance()->add('policy1', $policy);
        $subject = new Subject((object) ['username' => 'ccornutt']);
        $en = new Enforcer($policySet);
        $this->assertFalse($en->allows('policy1', $subject));
    }