LocaleNonInteractiveInstallTest.php
Same filename and directory in other branches
- 10 core/modules/locale/tests/src/Functional/LocaleNonInteractiveInstallTest.php
- 11.x core/modules/locale/tests/src/Functional/LocaleNonInteractiveInstallTest.php
- 9 core/modules/locale/tests/src/Functional/LocaleNonInteractiveInstallTest.php
- 8.9.x core/modules/locale/tests/src/Functional/LocaleNonInteractiveInstallTest.php
Namespace
Drupal\Tests\locale\FunctionalFile
-
core/
modules/ locale/ tests/ src/ Functional/ LocaleNonInteractiveInstallTest.php
View source
<?php
declare (strict_types=1);
namespace Drupal\Tests\locale\Functional;
use Drupal\Tests\BrowserTestBase;
use Drupal\Tests\Traits\Core\Locale\InstallerLanguageTrait;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
/**
* Tests installing in a different language with a non-dev version string.
*/
class LocaleNonInteractiveInstallTest extends BrowserTestBase {
use InstallerLanguageTrait;
/**
* {@inheritdoc}
*/
protected $defaultTheme = 'stark';
/**
* {@inheritdoc}
*/
protected function getInstallLangcode() : string {
return 'de';
}
/**
* {@inheritdoc}
*/
protected function getTranslationFileContents() : string {
return <<<PO
msgid ""
msgstr ""
msgid "Log in"
msgstr "Anmelden"
PO;
}
/**
* Tests that the expected translated text appears on the login screen.
*/
public function testInstallerTranslations() : void {
$this->drupalGet('user/login');
// cSpell:disable-next-line
$this->assertSession()
->responseContains('Anmelden');
}
}
Classes
| Title | Deprecated | Summary |
|---|---|---|
| LocaleNonInteractiveInstallTest | Tests installing in a different language with a non-dev version string. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.