AcControllerResourceTest::testShouldPerformAuthorizationUsingControllerActionAndLoadedModel PHP Method

testShouldPerformAuthorizationUsingControllerActionAndLoadedModel() public method

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