function UrlConversionTest::testDriverModuleDoesNotExist
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Database/UrlConversionTest.php \Drupal\Tests\Core\Database\UrlConversionTest::testDriverModuleDoesNotExist()
- 10 core/tests/Drupal/Tests/Core/Database/UrlConversionTest.php \Drupal\Tests\Core\Database\UrlConversionTest::testDriverModuleDoesNotExist()
- 11.x core/tests/Drupal/Tests/Core/Database/UrlConversionTest.php \Drupal\Tests\Core\Database\UrlConversionTest::testDriverModuleDoesNotExist()
@covers ::convertDbUrlToConnectionInfo
File
-
core/
tests/ Drupal/ Tests/ Core/ Database/ UrlConversionTest.php, line 403
Class
- UrlConversionTest
- Tests for database URL to/from database connection array coversions.
Namespace
Drupal\Tests\Core\DatabaseCode
public function testDriverModuleDoesNotExist() {
$url = 'mysql://test_user:test_pass@test_host:3306/test_database?module=does_not_exist';
$this->expectException(\RuntimeException::class);
$this->expectExceptionMessage("Cannot find the module 'does_not_exist' for the database driver namespace 'Drupal\\does_not_exist\\Driver\\Database\\mysql'");
Database::convertDbUrlToConnectionInfo($url, $this->root);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.