@@ 45-52 (lines=8) @@ | ||
42 | /** |
|
43 | * @test |
|
44 | */ |
|
45 | public function testListAction() |
|
46 | { |
|
47 | $this->serverEnvironment('GET', 'localhost', '/api/v1/employees'); |
|
48 | $response = $this->call('GET', 'http://localhost/api/v1/employees'); |
|
49 | ||
50 | $this->assertEquals(200, $response->getStatusCode()); |
|
51 | $this->assertEquals('application/vnd.api+json', $response->headers->get('Content-type')); |
|
52 | } |
|
53 | ||
54 | /** |
|
55 | * @test |
|
@@ 98-105 (lines=8) @@ | ||
95 | /** |
|
96 | * @test |
|
97 | */ |
|
98 | public function testGetActionWhenEmployeeDoesNotExist() |
|
99 | { |
|
100 | $this->serverEnvironment('GET', 'localhost', '/api/v1/employees/1000'); |
|
101 | $response = $this->call('GET', 'http://localhost/api/v1/employees/1000'); |
|
102 | ||
103 | $this->assertEquals(404, $response->getStatusCode()); |
|
104 | $this->assertEquals('application/vnd.api+json', $response->headers->get('Content-type')); |
|
105 | } |
|
106 | ||
107 | /** |
|
108 | * @test |
|
@@ 211-218 (lines=8) @@ | ||
208 | /** |
|
209 | * @test |
|
210 | */ |
|
211 | public function testDeleteActionWhenEmployeeDoesNotExistReturns404() |
|
212 | { |
|
213 | $this->serverEnvironment('DELETE', 'localhost', '/api/v1/employees/1000'); |
|
214 | $response = $this->call('DELETE', 'http://localhost/api/v1/employees/1000'); |
|
215 | ||
216 | $this->assertEquals(404, $response->getStatusCode()); |
|
217 | $this->assertEquals('application/vnd.api+json', $response->headers->get('Content-type')); |
|
218 | } |
|
219 | } |
|
220 |