public function testUploadingFileWithUnexpectedMimeTypeFails(): void
{ $data =
$this->
prepareImportExportActionControllerTestData(2
);
$this->repository->
create(array_values($data),
$this->context
);
foreach ($data as $entry) { $client =
$this->
getBrowser();
$client->
request( 'POST',
'/api/_action/import-export/prepare',
['profileId' =>
$entry['id'
], 'expireDate' =>
date('Y-m-d H:i:s'
)],
['file' =>
$this->
getUploadFile('text/html', 'test.xml'
)],
['Content-Type' => 'multipart/formdata'
] );
$response =
$client->
getResponse();
static::
assertSame(Response::HTTP_BAD_REQUEST,
$response->
getStatusCode());
} } public function testUploadingFileSuccess(): void
{