8000 merged branch ManuelKiessling/ticket_3139 (PR #3140) · lsmith77/symfony@3d72fae · GitHub
[go: up one dir, main page]

Skip to content

Commit 3d72fae

Browse files
committed
merged branch ManuelKiessling/ticket_3139 (PR symfony#3140)
Commits ------- a1317c3 [Locale][Testing] Fixed breaking tests if 'intl' extension is not installed (symfony#3139) Discussion ---------- [Locale][Testing] Fixed breaking tests if 'intl' extension is not installed (symfony#3139) Bug fix: yes Feature addition: no Backwards compatibility break: no Symfony2 tests pass: ![Build Status](https://secure.travis-ci.org/ManuelKiessling/symfony.png?branch=ticket_3139) Fixes the following tickets: symfony#3139 Todo: - Symfony\Tests\Component\Locale\LocaleTest->testGetDisplayCountriesReturnsFullListForSubLocale() fails with a fatal error if the PHP extension 'intl' is not installed on the system. Added a check which skips the affected tests if the extension is not available. Fixes symfony#3139
2 parents 0dd3292 + a1317c3 commit 3d72fae

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tests/Symfony/Tests/Component/Locale/LocaleTest.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,16 @@
1111

1212
namespace Symfony\Tests\Component\Locale;
1313

14+
require_once __DIR__.'/TestCase.php';
15+
1416
use Symfony\Component\Locale\Locale;
17+
use Symfony\Tests\Component\Locale\TestCase as LocaleTestCase;
1518

16-
class LocaleTest extends \PHPUnit_Framework_TestCase
19+
class LocaleTest extends LocaleTestCase
1720
{
1821
public function testGetDisplayCountriesReturnsFullListForSubLocale()
1922
{
23+
$this->skipIfIntlExtensionIsNotLoaded();
2024
$countriesDe = Locale::getDisplayCountries('de');
2125
$countriesDeCh = Locale::getDisplayCountries('de_CH');
2226

@@ -27,6 +31,7 @@ public function testGetDisplayCountriesReturnsFullListForSubLocale()
2731

2832
public function testGetDisplayLanguagesReturnsFullListForSubLocale()
2933
{
34+
$this->skipIfIntlExtensionIsNotLoaded();
3035
$languagesDe = Locale::getDisplayLanguages('de');
3136
$languagesDeCh = Locale::getDisplayLanguages('de_CH');
3237

@@ -37,6 +42,7 @@ public function testGetDisplayLanguagesReturnsFullListForSubLocale()
3742

3843
public function testGetDisplayLocalesReturnsFullListForSubLocale()
3944
{
45+
$this->skipIfIntlExtensionIsNotLoaded();
4046
$localesDe = Locale::getDisplayLocales('de');
4147
$localesDeCh = Locale::getDisplayLocales('de_CH');
4248

0 commit comments

Comments
 (0)
0