Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ protected function deleteTmpDir()
*/
public function testThatACacheIsUsed($debug)
{
if (!class_exists(\MessageFormatter::class)) {
$this->markTestSkipped(sprintf('Skipping test as the required "%s" class does not exist. Consider installing the "intl" PHP extension or the "symfony/polyfill-intl-messageformatter" package.', \MessageFormatter::class));
}

$locale = 'any_locale';
$format = 'some_format';
$msgid = 'test';
Expand Down
4 changes: 4 additions & 0 deletions src/Symfony/Component/Translation/Tests/TranslatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,10 @@ public function testTrans($expected, $id, $translation, $parameters, $locale, $d
*/
public function testTransICU(...$args)
{
if (!class_exists(\MessageFormatter::class)) {
$this->markTestSkipped(sprintf('Skipping test as the required "%s" class does not exist. Consider installing the "intl" PHP extension or the "symfony/polyfill-intl-messageformatter" package.', \MessageFormatter::class));
}

$this->testTrans(...$args);
}

Expand Down