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