| 1 | <?php |
||
| 6 | class CreatedTest extends TestCase |
||
| 7 | { |
||
| 8 | public function testInstantiation(): void |
||
| 9 | { |
||
| 10 | $response = new Created('http://example-location', 'test content', ['Content-Type' => 'application/json']); |
||
| 11 | |||
| 12 | $this->assertEquals(201, $response->getStatusCode()); |
||
| 13 | $this->assertEquals('test content', $response->getContent()); |
||
| 14 | $this->assertEquals('http://example-location', $response->headers->get('location')); |
||
| 15 | $this->assertEquals('application/json', $response->headers->get('content-type')); |
||
| 16 | } |
||
| 17 | } |
||
| 18 |