public function setUp()
 {
     parent::setUp();
     // Route::enableFilters();
     $this->controllerClass = $this->mock('AcControllerAdditionsClass');
     $this->controller = $this->controllerClass->makePartial();
     $this->controller->shouldReceive('getParams')->andReturn([]);
     $this->controller->shouldReceive('getCurrentUser')->andReturn("currentUser");
 }
 public function setUp()
 {
     parent::setUp();
     $this->user = new stdClass();
     $this->user->id = 1;
     $this->user->email = "testuser@localhost";
     $this->user->name = "TestUser";
     $this->authority = App::make('authority');
     $this->authority->setCurrentUser($this->user);
 }
 public function setUp()
 {
     parent::setUp();
     $this->app = $this->app = App::getFacadeRoot();
     $this->app['router'] = $this->router = $this->mockRouter();
     $this->controllerName = "ProjectsController";
     $this->router->resource('projects', $this->controllerName);
     $this->parameters = new \Efficiently\AuthorityController\Parameters();
     $this->app->instance('Params', $this->parameters);
 }
 public function setUp()
 {
     parent::setUp();
     View::addLocation(__DIR__ . '/fixtures/views');
     $this->controllerName = "AcProjectsController";
     $this->modelName = "AcProject";
     $this->modelAttributes = ['id' => 5, 'name' => 'Test AuthorityController package', 'priority' => 1];
     $this->resourceName = "ac_projects";
     // str_plural(snake_case($this->modelName));
     Route::resource($this->resourceName, $this->controllerName);
     $this->userAttributes = ['id' => 1, 'username' => 'tortue', 'firstname' => 'Tortue', 'lastname' => 'Torche', 'email' => '*****@*****.**', 'password' => Hash::make('tortuetorche'), 'displayname' => 'Tortue Torche'];
     $this->user = $this->getUserWithRole('admin');
     $this->authority = $this->getAuthority($this->user);
     $this->authority->allow('manage', $this->modelName);
 }
 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' => []] });;
 }