function ConnectionTest::providerCreateConnectionOptionsFromUrl
Same name in other branches
- 9 core/modules/sqlite/tests/src/Unit/ConnectionTest.php \Drupal\Tests\sqlite\Unit\ConnectionTest::providerCreateConnectionOptionsFromUrl()
- 8.9.x core/tests/Drupal/Tests/Core/Database/Driver/sqlite/ConnectionTest.php \Drupal\Tests\Core\Database\Driver\sqlite\ConnectionTest::providerCreateConnectionOptionsFromUrl()
- 10 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/
modules/ sqlite/ tests/ src/ Unit/ ConnectionTest.php, line 42
Class
- ConnectionTest
- @coversDefaultClass \Drupal\sqlite\Driver\Database\sqlite\Connection @group Database
Namespace
Drupal\Tests\sqlite\UnitCode
public static 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.