public function testCannotCreateImage(): void
{ $exception = MediaException::
cannotCreateImage();
static::
assertEquals(Response::HTTP_INTERNAL_SERVER_ERROR,
$exception->
getStatusCode());
static::
assertEquals(MediaException::MEDIA_CANNOT_CREATE_IMAGE_HANDLE,
$exception->
getErrorCode());
static::
assertEquals('Can not create image handle.',
$exception->
getMessage());
} public function testMediaContainsNoThumbnails(): void
{ $exception = MediaException::
mediaContainsNoThumbnails();
static::
assertEquals(Response::HTTP_INTERNAL_SERVER_ERROR,
$exception->
getStatusCode());
static::
assertEquals(MediaException::MEDIA_CONTAINS_NO_THUMBNAILS,
$exception->
getErrorCode());
static::
assertEquals('Media contains no thumbnails.',
$exception->
getMessage());
} public function testStrategyNotFound(): void
{ $strategyName = 'strategy-name';
$exception = MediaException::
strategyNotFound($strategyName);