public function InstallerNonDefaultDatabaseDriverTest::testInstalled in Drupal 8
Same name and namespace in other branches
- 9 core/tests/Drupal/FunctionalTests/Installer/InstallerNonDefaultDatabaseDriverTest.php \Drupal\FunctionalTests\Installer\InstallerNonDefaultDatabaseDriverTest::testInstalled()
Confirms that the installation succeeded.
File
- core/
tests/ Drupal/ FunctionalTests/ Installer/ InstallerNonDefaultDatabaseDriverTest.php, line 53
Class
- InstallerNonDefaultDatabaseDriverTest
- Tests the interactive installer.
Namespace
Drupal\FunctionalTests\InstallerCode
public function testInstalled() {
$this
->assertUrl('user/1');
$this
->assertSession()
->statusCodeEquals(200);
// Assert that in the settings.php the database connection array has the
// correct values set.
$contents = file_get_contents($this->root . '/' . $this->siteDirectory . '/settings.php');
$this
->assertStringContainsString("'namespace' => 'Drupal\\\\driver_test\\\\Driver\\\\Database\\\\{$this->testDriverName}',", $contents);
$this
->assertStringContainsString("'driver' => '{$this->testDriverName}',", $contents);
$this
->assertStringContainsString("'autoload' => 'core/modules/system/tests/modules/driver_test/src/Driver/Database/{$this->testDriverName}/',", $contents);
}