'de-DE' => 'Swag App Test',
],
$metaData->
getLabel());
static::
assertEquals([],
$metaData->
getDescription());
$array =
$metaData->
toArray('en-GB'
);
static::
assertEquals([],
$array['description'
]);
} public function testValidateTranslationsReturnsMissingTranslationErrorIfTranslationIsMissing(): void
{ $manifest = Manifest::
createFromXmlFile(__DIR__ . '/../_fixtures/invalid-translations-manifest.xml'
);
$error =
$manifest->
getMetadata()->
validateTranslations();
static::
assertInstanceOf(MissingTranslationError::
class,
$error);
static::
assertEquals('Missing translations for "Metadata":
- label: de-DE, fr-FR',
$error->
getMessage());
} public function testValidateTranslationsReturnsNull(): void
{ $manifest = Manifest::
createFromXmlFile(__DIR__ . '/../_fixtures/test-manifest.xml'
);
$error =
$manifest->
getMetadata()->
validateTranslations();