| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | public function testImagePost() |
||
| 12 | { |
||
| 13 | $basePath = __DIR__.'/../../../../web/uploads/tests/'; |
||
| 14 | $fs = new Filesystem(); |
||
| 15 | $fs->copy($basePath.'admissibles.png', $basePath.'admissibles2.png'); |
||
| 16 | $list = new UploadedFile($basePath.'admissibles2.png', 'admissibles2.png'); |
||
| 17 | |||
| 18 | $this->client->request('POST', '/images', [], ['file' => $list]); |
||
| 19 | $response = $this->client->getResponse(); |
||
| 20 | $this->assertJsonResponse($response, 201); |
||
| 21 | $response = json_decode($response->getContent(), true); |
||
| 22 | $this->assertArrayHasKey('filelink', $response); |
||
| 23 | } |
||
| 24 | } |
||
| 25 |