/**
  * @test
  */
 public function shouldRemoveProgressInfoFromRequest()
 {
     // given
     $handler = new RequestHandlerMock();
     // when
     $json = $handler->handle("Car/1/read", array('LudoDBProgressID' => $this->getUniqueProgressId()));
     $response = JSON_decode($json, true);
     $data = $response['response'];
     // then
     $this->assertTrue($response['success'], $json);
     $this->assertNotNull($data['brand'], $json);
     $this->assertEquals('Opel', $data['brand'], $json);
 }
 /**
  * @test
  */
 public function shouldReturnQueryWhenAuthenticated()
 {
     // given
     $request = "Person/1/read";
     $handler = new RequestHandlerMock();
     $handler->setAuthenticator(new AccessGrantedAuthenticator());
     $data = json_decode($handler->handle($request), true);
     // then
     $this->assertTrue($data['success']);
 }