function ConnectionTest::providerCreateConnectionOptionsFromUrl
Same name in other branches
- 9 core/modules/sqlite/tests/src/Unit/ConnectionTest.php \Drupal\Tests\sqlite\Unit\ConnectionTest::providerCreateConnectionOptionsFromUrl()
- 10 core/modules/sqlite/tests/src/Unit/ConnectionTest.php \Drupal\Tests\sqlite\Unit\ConnectionTest::providerCreateConnectionOptionsFromUrl()
- 11.x core/modules/sqlite/tests/src/Unit/ConnectionTest.php \Drupal\Tests\sqlite\Unit\ConnectionTest::providerCreateConnectionOptionsFromUrl()
Data provider for testCreateConnectionOptionsFromUrl.
Return value
string[][] Associative array of arrays with the following elements:
- SQLite database URL
- Expected database connection option
File
-
core/
tests/ Drupal/ Tests/ Core/ Database/ Driver/ sqlite/ ConnectionTest.php, line 40
Class
- ConnectionTest
- @coversDefaultClass \Drupal\Core\Database\Driver\sqlite\Connection @group Database
Namespace
Drupal\Tests\Core\Database\Driver\sqliteCode
public function providerCreateConnectionOptionsFromUrl() : array {
$root = dirname(__DIR__, 8);
return [
'sqlite relative path' => [
'sqlite://localhost/tmp/test',
$root . '/tmp/test',
],
'sqlite absolute path' => [
'sqlite://localhost//tmp/test',
'/tmp/test',
],
'in memory sqlite path' => [
'sqlite://localhost/:memory:',
':memory:',
],
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.