InstallerLanguagePageTest.php in Drupal 9
File
core/tests/Drupal/FunctionalTests/Installer/InstallerLanguagePageTest.php
View source
<?php
namespace Drupal\FunctionalTests\Installer;
use Drupal\Core\Language\LanguageManager;
class InstallerLanguagePageTest extends InstallerTestBase {
protected $defaultTheme = 'stark';
protected function setUpLanguage() {
mkdir($this->root . '/' . $this->siteDirectory . '/files/translations', 0777, TRUE);
touch($this->root . '/' . $this->siteDirectory . '/files/translations/drupal-8.0.0.xoxo.po');
$this
->visitInstaller();
foreach (LanguageManager::getStandardLanguageList() as $langcode => $names) {
$this
->assertSession()
->optionExists('edit-langcode', $langcode);
$this
->assertSession()
->responseContains('>' . $names[1] . '<');
}
$this
->assertSession()
->optionExists('edit-langcode', 'xoxo');
$this
->assertSession()
->responseContains('>xoxo<');
parent::setUpLanguage();
}
public function testInstalled() {
$this
->assertSession()
->addressEquals('user/1');
$this
->assertSession()
->statusCodeEquals(200);
}
}