| @@ 29-35 (lines=7) @@ | ||
| 26 | /** |
|
| 27 | * @test |
|
| 28 | */ |
|
| 29 | public function testListAction() |
|
| 30 | { |
|
| 31 | $response = $this->call('GET', 'http://localhost/api/v1/employees'); |
|
| 32 | ||
| 33 | $this->assertEquals(200, $response->getStatusCode()); |
|
| 34 | $this->assertEquals('application/vnd.api+json', $response->headers->get('Content-type')); |
|
| 35 | } |
|
| 36 | ||
| 37 | /** |
|
| 38 | * @test |
|
| @@ 80-86 (lines=7) @@ | ||
| 77 | /** |
|
| 78 | * @test |
|
| 79 | */ |
|
| 80 | public function testGetActionWhenEmployeeDoesNotExist() |
|
| 81 | { |
|
| 82 | $response = $this->call('GET', 'http://localhost/api/v1/employees/1000'); |
|
| 83 | ||
| 84 | $this->assertEquals(404, $response->getStatusCode()); |
|
| 85 | $this->assertEquals('application/vnd.api+json', $response->headers->get('Content-type')); |
|
| 86 | } |
|
| 87 | ||
| 88 | /** |
|
| 89 | * @test |
|
| @@ 240-246 (lines=7) @@ | ||
| 237 | /** |
|
| 238 | * @test |
|
| 239 | */ |
|
| 240 | public function testDeleteActionWhenEmployeeDoesNotExistReturns404() |
|
| 241 | { |
|
| 242 | $response = $this->call('DELETE', 'http://localhost/api/v1/employees/1000'); |
|
| 243 | ||
| 244 | $this->assertEquals(404, $response->getStatusCode()); |
|
| 245 | $this->assertEquals('application/vnd.api+json', $response->headers->get('Content-type')); |
|
| 246 | } |
|
| 247 | } |
|
| 248 | ||