/**
* @internal
*
* @covers \Shopware\Core\Content\Media\MediaException
*/
#[Package('buyers-experience')]
class MediaExceptionTest extends TestCase
{ public function testInvalidContentLength(): void
{ $exception = MediaException::
invalidContentLength();
static::
assertEquals(Response::HTTP_BAD_REQUEST,
$exception->
getStatusCode());
static::
assertEquals(MediaException::MEDIA_INVALID_CONTENT_LENGTH,
$exception->
getErrorCode());
static::
assertEquals('Expected content-length did not match actual size.',
$exception->
getMessage());
} public function testInvalidUrl(): void
{ $url = 'http://invalid-url';
$exception = MediaException::
invalidUrl($url);