You are here

protected function DistributionProfileTranslationTest::setUpSettings in Drupal 8

Same name and namespace in other branches
  1. 9 core/tests/Drupal/FunctionalTests/Installer/DistributionProfileTranslationTest.php \Drupal\FunctionalTests\Installer\DistributionProfileTranslationTest::setUpSettings()

Installer step: Configure settings.

Overrides InstallerTestBase::setUpSettings

File

core/tests/Drupal/FunctionalTests/Installer/DistributionProfileTranslationTest.php, line 80

Class

DistributionProfileTranslationTest
Tests distribution profile support.

Namespace

Drupal\FunctionalTests\Installer

Code

protected function setUpSettings() {

  // The language should have been automatically detected, all following
  // screens should be translated already.
  $elements = $this
    ->xpath('//input[@type="submit"]/@value');
  $this
    ->assertEqual(current($elements)
    ->getText(), 'Save and continue de');
  $this->translations['Save and continue'] = 'Save and continue de';

  // Check the language direction.
  $direction = current($this
    ->xpath('/@dir'))
    ->getText();
  $this
    ->assertEqual($direction, 'ltr');

  // Verify that the distribution name appears.
  $this
    ->assertRaw($this->info['distribution']['name']);

  // Verify that the requested theme is used.
  $this
    ->assertRaw($this->info['distribution']['install']['theme']);

  // Verify that the "Choose profile" step does not appear.
  $this
    ->assertNoText('profile');
  parent::setUpSettings();
}