public function setUp() { parent::setUp(); // instead of setting up the filters and having to deal with auth/csrf, just // bind the controllers manually $this->app->bind('anlutro\\Core\\Web\\AuthController', 'anlutro\\Core\\Web\\ApiAuthController'); $this->app->bind('anlutro\\Core\\Web\\UserController', 'anlutro\\Core\\Web\\ApiUserController'); // mock a JSON/AJAX request $this->client->setServerParameter('HTTP_X-Requested-With', 'XMLHttpRequest'); $this->client->setServerParameter('HTTP_CONTENT_TYPE', 'application/json'); $this->client->setServerParameter('HTTP_ACCEPT', 'application/json'); }
protected function setupIndexExpectations($results = array()) { parent::setUpIndexExpectations($results); $this->users->shouldReceive('getUserTypes')->once()->andReturn([]); }