Skip to content

Commit a545deb

Browse files
committed
skip tests if required class does not exist
1 parent 01b2539 commit a545deb

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/Symfony/Component/Translation/Tests/TranslatorCacheTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ protected function deleteTmpDir()
5959
*/
6060
public function testThatACacheIsUsed($debug)
6161
{
62+
if (!class_exists(\MessageFormatter::class)) {
63+
$this->markTestSkipped(sprintf('Skipping test as the "%s" class does not exist.', \MessageFormatter::class));
64+
}
65+
6266
$locale = 'any_locale';
6367
$format = 'some_format';
6468
$msgid = 'test';

src/Symfony/Component/Translation/Tests/TranslatorTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,10 @@ public function testTrans($expected, $id, $translation, $parameters, $locale, $d
373373
*/
374374
public function testTransICU(...$args)
375375
{
376+
if (!class_exists(\MessageFormatter::class)) {
377+
$this->markTestSkipped(sprintf('Skipping test as the "%s" class does not exist.', \MessageFormatter::class));
378+
}
379+
376380
$this->testTrans(...$args);
377381
}
378382

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy