public function test_with_unexisting_owner_type()
 {
     ResourceServer::shouldReceive('getOwnerType')->once()->andReturn('foo');
     $response = $this->getFilter()->filter('', '', 'bar');
     $this->assertTrue($response instanceof Illuminate\Http\JsonResponse);
     $this->assertTrue($response->isForbidden());
 }
 public function test_valid_filter_with_unexisting_scope()
 {
     ResourceServer::shouldReceive('isValid')->once()->andReturn(true);
     ResourceServer::shouldReceive('hasScope')->once()->andReturn(false);
     $response = $this->getFilter()->filter('', '', 'scope1', 'scope2');
     $this->assertTrue($response instanceof Illuminate\Http\JsonResponse);
     $this->assertTrue($response->isForbidden());
 }