function InstallerNonEnglishProfileWithoutLocaleModuleTest::testNonEnglishProfileWithoutLocaleModule

Same name in other branches
  1. 9 core/tests/Drupal/FunctionalTests/Installer/InstallerNonEnglishProfileWithoutLocaleModuleTest.php \Drupal\FunctionalTests\Installer\InstallerNonEnglishProfileWithoutLocaleModuleTest::testNonEnglishProfileWithoutLocaleModule()
  2. 10 core/tests/Drupal/FunctionalTests/Installer/InstallerNonEnglishProfileWithoutLocaleModuleTest.php \Drupal\FunctionalTests\Installer\InstallerNonEnglishProfileWithoutLocaleModuleTest::testNonEnglishProfileWithoutLocaleModule()
  3. 11.x core/tests/Drupal/FunctionalTests/Installer/InstallerNonEnglishProfileWithoutLocaleModuleTest.php \Drupal\FunctionalTests\Installer\InstallerNonEnglishProfileWithoutLocaleModuleTest::testNonEnglishProfileWithoutLocaleModule()

Tests installing a profile with non-English language and no locale module.

File

core/tests/Drupal/FunctionalTests/Installer/InstallerNonEnglishProfileWithoutLocaleModuleTest.php, line 62

Class

InstallerNonEnglishProfileWithoutLocaleModuleTest
Tests installing a profile with non-English language and no locale module.

Namespace

Drupal\FunctionalTests\Installer

Code

public function testNonEnglishProfileWithoutLocaleModule() {
    $this->assertSession()
        ->statusCodeEquals(200);
    $this->assertUrl('user/1');
    // Confirm that we are logged-in after installation.
    $this->assertText($this->rootUser
        ->getAccountName());
    // Verify that the confirmation message appears.
    require_once $this->root . '/core/includes/install.inc';
    $this->assertRaw(t('Congratulations, you installed @drupal!', [
        '@drupal' => drupal_install_profile_distribution_name(),
    ]));
    $this->assertFalse(\Drupal::service('module_handler')->moduleExists('locale'), 'The Locale module is not installed.');
    $this->assertTrue(\Drupal::service('module_handler')->moduleExists('language'), 'The Language module is installed.');
    $this->assertTrue(\Drupal::languageManager()->isMultilingual(), 'The language manager is multi-lingual.');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.