'id' =>
$id,
'name' => 'Test media',
'fileName' => 'testFile',
'mimeType' => 'image/jpeg',
'fileExtension' => 'jpg',
'url' => 'www.example.com',
],
],
$writeContext );
$media =
$this->
getMediaRepository()->
search( new Criteria([$id]),
Context::
createDefaultContext() )->
get($id);
static::
assertStringEndsWith('/testFile.jpg',
$media->
getUrl());
} public function testUpdateIgnoresRuntimeFields(): void
{ static::
assertNotNull($this->
getContainer()->
get(MediaDefinition::
class)->
getFields()->
get('url'
)->
getFlag(Runtime::
class));
$id = '2b9a945bb62b4122a32a3bbfbe1e6fd3';
$writeContext =
$this->
createWriteContext();