AcControllerResourceTest::testShouldPerformAuthorizationUsingControllerActionAndNonLoadedModel PHP Метод

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

Should perform authorization using controller action and non loaded model
    public function testShouldPerformAuthorizationUsingControllerActionAndNonLoadedModel()
    {
        $this->params = array_merge($this->params, array_merge(['action' => 'show', 'id' => '123']));
        $this->controller->shouldReceive('authorize')->once()->with('show', 'Project')->andThrow('Efficiently\\AuthorityController\\Exceptions\\AccessDenied');
        $resource = new Efficiently\AuthorityController\ControllerResource($this->controller);
        $resource->authorizeResource();
    }
AcControllerResourceTest