public function InstallerTest::testInstaller in Drupal 8
Same name and namespace in other branches
- 9 core/tests/Drupal/FunctionalTests/Installer/InstallerTest.php \Drupal\FunctionalTests\Installer\InstallerTest::testInstaller()
Ensures that the user page is available after installation.
File
- core/
tests/ Drupal/ FunctionalTests/ Installer/ InstallerTest.php, line 20
Class
- InstallerTest
- Tests the interactive installer.
Namespace
Drupal\FunctionalTests\InstallerCode
public function testInstaller() {
$this
->assertUrl('user/1');
$this
->assertSession()
->statusCodeEquals(200);
// 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(),
]));
// Ensure that the timezone is correct for sites under test after installing
// interactively.
$this
->assertEqual($this
->config('system.date')
->get('timezone.default'), 'Australia/Sydney');
// Ensure the profile has a weight of 1000.
$module_extension_list = \Drupal::service('extension.list.module');
$extensions = $module_extension_list
->getList();
$this
->assertArrayHasKey('testing', $extensions);
$this
->assertEquals(1000, $extensions['testing']->weight);
}