AcControllerResourceTest::testShouldNotCallClosureWhenOnlyClassNameIsPassedOnlyReturnTrue PHP Метод

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

Should not call Closure when only class name is passed, only return true
    public function testShouldNotCallClosureWhenOnlyClassNameIsPassedOnlyReturnTrue()
    {
        $blockCalled = false;
        $this->authority->allow('preview', 'all', function ($self, $object) use(&$blockCalled) {
            return $blockCalled = true;
        });
        $this->assertTrue($this->authority->can('preview', 'Project'));
        $this->assertFalse($blockCalled);
    }
AcControllerResourceTest