static::
assertEquals($statusCode,
$caughtException->
getStatusCode());
static::
assertEquals($errorCode,
$caughtException->
getErrorCode());
static::
assertEquals($message,
$caughtException->
getMessage());
} /**
* @return array<string, array{exception: ImportExportException|ShopwareHttpException, statusCode: int, errorCode: string, message: string}>
*/
public static function exceptionDataProvider(): iterable
{ yield 'CONTENT__IMPORT_EXPORT_FILE_INVALID_ACCESS_TOKEN' =>
[ 'exception' => ImportExportException::
invalidFileAccessToken(),
'statusCode' => Response::HTTP_BAD_REQUEST,
'errorCode' => 'CONTENT__IMPORT_EXPORT_FILE_INVALID_ACCESS_TOKEN',
'message' => 'Access to file denied due to invalid access token',
];
yield 'CONTENT__IMPORT_EXPORT_FILE_NOT_FOUND' =>
[ 'exception' => ImportExportException::
fileNotFound('notFoundFile'
),
'statusCode' => Response::HTTP_NOT_FOUND,
'errorCode' => 'CONTENT__IMPORT_EXPORT_FILE_NOT_FOUND',
'message' => 'Cannot find import/export file with id notFoundFile',
];