Fix upload file tests

This commit is contained in:
Nicolas Le Goff
2015-03-11 16:28:06 +01:00
parent ae26a9563f
commit f8963d2e04

View File

@@ -1484,8 +1484,8 @@ abstract class ApiTestCase extends \PhraseanetWebTestCase
$route = '/api/v1/records/add/';
$file = [
new \Symfony\Component\HttpFoundation\File\UploadedFile(self::$DI['app']['root.path'].'/tests/files/' , 'recta_logo.gif'),
new \Symfony\Component\HttpFoundation\File\UploadedFile(self::$DI['app']['root.path'].'/tests/files/', 'rectb_logo.gif'),
new \Symfony\Component\HttpFoundation\File\UploadedFile(self::$DI['app']['root.path'].'/tests/files/recta_logo.gif' , 'recta_logo.gif'),
new \Symfony\Component\HttpFoundation\File\UploadedFile(self::$DI['app']['root.path'].'/tests/files/rectb_logo.gif', 'rectb_logo.gif'),
];
self::$DI['client']->request('POST', $route, $this->getParameters($this->getAddRecordParameters()), ['file' => $file], ['HTTP_Accept' => $this->getAcceptMimeType()]);