Chris@16: assertUrl('user/1'); Chris@16: $this->assertResponse(200); Chris@16: // Confirm that we are logged-in after installation. Chris@18: $this->assertText($this->rootUser->getAccountName()); Chris@16: Chris@16: // Verify that the confirmation message appears. Chris@17: require_once $this->root . '/core/includes/install.inc'; Chris@16: $this->assertRaw(t('Congratulations, you installed @drupal!', [ Chris@16: '@drupal' => drupal_install_profile_distribution_name(), Chris@16: ])); Chris@16: Chris@16: // Ensure that the timezone is correct for sites under test after installing Chris@16: // interactively. Chris@16: $this->assertEqual($this->config('system.date')->get('timezone.default'), 'Australia/Sydney'); Chris@16: } Chris@16: Chris@16: /** Chris@16: * Installer step: Select language. Chris@16: */ Chris@16: protected function setUpLanguage() { Chris@16: // Test that \Drupal\Core\Render\BareHtmlPageRenderer adds assets and Chris@16: // metatags as expected to the first page of the installer. Chris@16: $this->assertRaw("core/themes/seven/css/components/buttons.css"); Chris@16: $this->assertRaw(''); Chris@16: Chris@16: // Assert that the expected title is present. Chris@16: $this->assertEqual('Choose language', $this->cssSelect('main h2')[0]->getText()); Chris@16: Chris@16: parent::setUpLanguage(); Chris@16: } Chris@16: Chris@16: /** Chris@16: * {@inheritdoc} Chris@16: */ Chris@16: protected function setUpProfile() { Chris@16: // Assert that the expected title is present. Chris@16: $this->assertEqual('Select an installation profile', $this->cssSelect('main h2')[0]->getText()); Chris@16: $result = $this->xpath('//span[contains(@class, :class) and contains(text(), :text)]', [':class' => 'visually-hidden', ':text' => 'Select an installation profile']); Chris@16: $this->assertEqual(count($result), 1, "Title/Label not displayed when '#title_display' => 'invisible' attribute is set"); Chris@16: Chris@16: parent::setUpProfile(); Chris@16: } Chris@16: Chris@16: /** Chris@16: * {@inheritdoc} Chris@16: */ Chris@16: protected function setUpSettings() { Chris@16: // Assert that the expected title is present. Chris@16: $this->assertEqual('Database configuration', $this->cssSelect('main h2')[0]->getText()); Chris@16: Chris@16: parent::setUpSettings(); Chris@16: } Chris@16: Chris@16: /** Chris@16: * {@inheritdoc} Chris@16: */ Chris@16: protected function setUpSite() { Chris@16: // Assert that the expected title is present. Chris@16: $this->assertEqual('Configure site', $this->cssSelect('main h2')[0]->getText()); Chris@16: Chris@16: // Test that SiteConfigureForm::buildForm() has made the site directory and Chris@16: // the settings file non-writable. Chris@16: $site_directory = $this->container->get('app.root') . '/' . $this->siteDirectory; Chris@16: $this->assertFalse(is_writable($site_directory)); Chris@16: $this->assertFalse(is_writable($site_directory . '/settings.php')); Chris@16: Chris@16: parent::setUpSite(); Chris@16: } Chris@16: Chris@16: /** Chris@16: * {@inheritdoc} Chris@16: */ Chris@16: protected function visitInstaller() { Chris@16: parent::visitInstaller(); Chris@16: Chris@16: // Assert the title is correct and has the title suffix. Chris@16: $this->assertTitle('Choose language | Drupal'); Chris@16: } Chris@16: Chris@16: }