public function DisableLanguageSettingsFormTest::testSettingsValidation in Disable language 8
Test form validation.
File
- tests/
src/ Functional/ DisableLanguageSettingsFormTest.php, line 44
Class
- DisableLanguageSettingsFormTest
- @coversDefaultClass \Drupal\disable_language\Form\DisableLanguageSettings @group disable_language
Namespace
Drupal\Tests\disable_language\FunctionalCode
public function testSettingsValidation() {
$this
->drupalGet('admin/config/regional/language/disable_language');
$this
->assertField('redirect_override_routes');
$edit = [
'redirect_override_routes' => 'foo.bar',
];
$this
->submitForm($edit, t('Save configuration'));
$this
->assertSession()
->pageTextContains('Route "foo.bar" does not exist.');
}