[Form] Fixed failing tests
This commit is contained in:
parent
5d0b849fc5
commit
99f6f8ab17
@ -17,17 +17,15 @@ class CountryTypeTest extends LocalizedTestCase
|
|||||||
{
|
{
|
||||||
public function testCountriesAreSelectable()
|
public function testCountriesAreSelectable()
|
||||||
{
|
{
|
||||||
\Locale::setDefault('de_AT');
|
|
||||||
|
|
||||||
$form = $this->factory->create('country');
|
$form = $this->factory->create('country');
|
||||||
$view = $form->createView();
|
$view = $form->createView();
|
||||||
$choices = $view->vars['choices'];
|
$choices = $view->vars['choices'];
|
||||||
|
|
||||||
// Don't check objects for identity
|
// Don't check objects for identity
|
||||||
$this->assertContains(new ChoiceView('DE', 'DE', 'Deutschland'), $choices, '', false, false);
|
$this->assertContains(new ChoiceView('DE', 'DE', 'Germany'), $choices, '', false, false);
|
||||||
$this->assertContains(new ChoiceView('GB', 'GB', 'Vereinigtes Königreich'), $choices, '', false, false);
|
$this->assertContains(new ChoiceView('GB', 'GB', 'United Kingdom'), $choices, '', false, false);
|
||||||
$this->assertContains(new ChoiceView('US', 'US', 'Vereinigte Staaten'), $choices, '', false, false);
|
$this->assertContains(new ChoiceView('US', 'US', 'United States'), $choices, '', false, false);
|
||||||
$this->assertContains(new ChoiceView('FR', 'FR', 'Frankreich'), $choices, '', false, false);
|
$this->assertContains(new ChoiceView('FR', 'FR', 'France'), $choices, '', false, false);
|
||||||
$this->assertContains(new ChoiceView('MY', 'MY', 'Malaysia'), $choices, '', false, false);
|
$this->assertContains(new ChoiceView('MY', 'MY', 'Malaysia'), $choices, '', false, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,17 +17,15 @@ class LanguageTypeTest extends LocalizedTestCase
|
|||||||
{
|
{
|
||||||
public function testCountriesAreSelectable()
|
public function testCountriesAreSelectable()
|
||||||
{
|
{
|
||||||
\Locale::setDefault('de_AT');
|
|
||||||
|
|
||||||
$form = $this->factory->create('language');
|
$form = $this->factory->create('language');
|
||||||
$view = $form->createView();
|
$view = $form->createView();
|
||||||
$choices = $view->vars['choices'];
|
$choices = $view->vars['choices'];
|
||||||
|
|
||||||
$this->assertContains(new ChoiceView('en', 'en', 'Englisch'), $choices, '', false, false);
|
$this->assertContains(new ChoiceView('en', 'en', 'English'), $choices, '', false, false);
|
||||||
$this->assertContains(new ChoiceView('en_GB', 'en_GB', 'Britisches Englisch'), $choices, '', false, false);
|
$this->assertContains(new ChoiceView('en_GB', 'en_GB', 'British English'), $choices, '', false, false);
|
||||||
$this->assertContains(new ChoiceView('en_US', 'en_US', 'Amerikanisches Englisch'), $choices, '', false, false);
|
$this->assertContains(new ChoiceView('en_US', 'en_US', 'U.S. English'), $choices, '', false, false);
|
||||||
$this->assertContains(new ChoiceView('fr', 'fr', 'Französisch'), $choices, '', false, false);
|
$this->assertContains(new ChoiceView('fr', 'fr', 'French'), $choices, '', false, false);
|
||||||
$this->assertContains(new ChoiceView('my', 'my', 'Birmanisch'), $choices, '', false, false);
|
$this->assertContains(new ChoiceView('my', 'my', 'Burmese'), $choices, '', false, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testMultipleLanguagesIsNotIncluded()
|
public function testMultipleLanguagesIsNotIncluded()
|
||||||
|
@ -17,14 +17,12 @@ class LocaleTypeTest extends LocalizedTestCase
|
|||||||
{
|
{
|
||||||
public function testLocalesAreSelectable()
|
public function testLocalesAreSelectable()
|
||||||
{
|
{
|
||||||
\Locale::setDefault('de_AT');
|
|
||||||
|
|
||||||
$form = $this->factory->create('locale');
|
$form = $this->factory->create('locale');
|
||||||
$view = $form->createView();
|
$view = $form->createView();
|
||||||
$choices = $view->vars['choices'];
|
$choices = $view->vars['choices'];
|
||||||
|
|
||||||
$this->assertContains(new ChoiceView('en', 'en', 'Englisch'), $choices, '', false, false);
|
$this->assertContains(new ChoiceView('en', 'en', 'English'), $choices, '', false, false);
|
||||||
$this->assertContains(new ChoiceView('en_GB', 'en_GB', 'Englisch (Vereinigtes Königreich)'), $choices, '', false, false);
|
$this->assertContains(new ChoiceView('en_GB', 'en_GB', 'English (United Kingdom)'), $choices, '', false, false);
|
||||||
$this->assertContains(new ChoiceView('zh_Hant_MO', 'zh_Hant_MO', 'Chinesisch (traditionell, Sonderverwaltungszone Macao)'), $choices, '', false, false);
|
$this->assertContains(new ChoiceView('zh_Hant_MO', 'zh_Hant_MO', 'Chinese (Traditional, Macau SAR China)'), $choices, '', false, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user