Skip to content

Commit 0bde12c

Browse files
author
Shein Alexey
committed
Added some skipifs to prevent fatal errors on missing extensions.
1 parent b1bb27e commit 0bde12c

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

src/Symfony/Component/Translation/Tests/Dumper/IcuResFileDumperTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ class IcuResFileDumperTest extends \PHPUnit_Framework_TestCase
1818
{
1919
public function testDump()
2020
{
21+
if (!extension_loaded('mbstring')) {
22+
$this->markTestSkipped('This test requires mbstring to work.');
23+
}
24+
2125
$catalogue = new MessageCatalogue('en');
2226
$catalogue->add(array('foo' => 'bar'));
2327

src/Symfony/Component/Translation/Tests/Loader/IcuDatFileLoaderTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ protected function setUp() {
2020
if (!class_exists('Symfony\Component\Config\Loader\Loader')) {
2121
$this->markTestSkipped('The "Config" component is not available');
2222
}
23+
24+
if (!extension_loaded('intl')) {
25+
$this->markTestSkipped('This test requires intl extension to work.');
26+
}
27+
2328
}
2429

2530
public function testDatEnglishLoad()

src/Symfony/Component/Translation/Tests/Loader/IcuResFileLoaderTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ protected function setUp() {
2020
if (!class_exists('Symfony\Component\Config\Loader\Loader')) {
2121
$this->markTestSkipped('The "Config" component is not available');
2222
}
23+
24+
if (!extension_loaded('intl')) {
25+
$this->markTestSkipped('This test requires intl extension to work.');
26+
}
27+
2328
}
2429

2530
public function testLoad()

0 commit comments

Comments
 (0)