AcControllerResourceTest::setUp PHP Метод

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

public setUp ( )
    public function setUp()
    {
        parent::setUp();
        $this->params = ['controller' => 'projects'];
        $this->controllerClass = $this->mock('ProjectsController');
        $this->controller = app('ProjectsController');
        $this->user = $this->getUserWithRole('admin');
        $this->authority = $this->getAuthority($this->user);
        $this->controller->shouldReceive('getParams')->andReturnUsing(function () {
            return $this->params;
        });
        $this->controller->shouldReceive('getCurrentAuthority')->andReturnUsing(function () {
            return $this->authority;
        });
        // $this->controllerClass->shouldReceive('cancanSkipper')->andReturnUsing( function() { return ['authorize' => [], 'load' => []] });;
    }
AcControllerResourceTest