Exemplo n.º 1
0
 public function testShowAllGirlsArchievedInJsonFormat()
 {
     // Test setup
     $expectedResponse = new JsonResponse([], 200);
     $girlServiceMock = $this->getMock('App\\Services\\GirlServiceInterface');
     $girlServiceMock->expects($this->once())->method('getAll')->will($this->returnValue(array()));
     $controller = new ApiController($girlServiceMock);
     // Test execution
     $response = $controller->allGirls();
     // Test assertion
     $this->assertEquals($expectedResponse, $response);
 }