public function LanguageFormTest::testEditingLanguage in Lingotek Translation 3.3.x
Same name and namespace in other branches
- 8.2 tests/src/Functional/Form/LanguageFormTest.php \Drupal\Tests\lingotek\Functional\Form\LanguageFormTest::testEditingLanguage()
- 4.0.x tests/src/Functional/Form/LanguageFormTest.php \Drupal\Tests\lingotek\Functional\Form\LanguageFormTest::testEditingLanguage()
- 3.0.x tests/src/Functional/Form/LanguageFormTest.php \Drupal\Tests\lingotek\Functional\Form\LanguageFormTest::testEditingLanguage()
- 3.1.x tests/src/Functional/Form/LanguageFormTest.php \Drupal\Tests\lingotek\Functional\Form\LanguageFormTest::testEditingLanguage()
- 3.2.x tests/src/Functional/Form/LanguageFormTest.php \Drupal\Tests\lingotek\Functional\Form\LanguageFormTest::testEditingLanguage()
- 3.4.x tests/src/Functional/Form/LanguageFormTest.php \Drupal\Tests\lingotek\Functional\Form\LanguageFormTest::testEditingLanguage()
- 3.5.x tests/src/Functional/Form/LanguageFormTest.php \Drupal\Tests\lingotek\Functional\Form\LanguageFormTest::testEditingLanguage()
- 3.6.x tests/src/Functional/Form/LanguageFormTest.php \Drupal\Tests\lingotek\Functional\Form\LanguageFormTest::testEditingLanguage()
- 3.7.x tests/src/Functional/Form/LanguageFormTest.php \Drupal\Tests\lingotek\Functional\Form\LanguageFormTest::testEditingLanguage()
- 3.8.x tests/src/Functional/Form/LanguageFormTest.php \Drupal\Tests\lingotek\Functional\Form\LanguageFormTest::testEditingLanguage()
Tests editing a defined language has the right locale.
File
- tests/
src/ Functional/ Form/ LanguageFormTest.php, line 63
Class
- LanguageFormTest
- Test the Drupal language form alters.
Namespace
Drupal\Tests\lingotek\Functional\FormCode
public function testEditingLanguage() {
ConfigurableLanguage::createFromLangcode('de')
->save();
$this
->drupalGet('/admin/config/regional/language');
// Click on edit for German.
$this
->clickLink('Edit', 1);
// Assert that the locale is correct.
$this
->assertFieldByName('lingotek_locale', 'de-DE', 'The Lingotek locale is set correctly.');
$this
->drupalPostForm(NULL, [
'name' => 'German (Germany)',
], 'Save language');
$this
->assertText('German (Germany)');
}