function 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 49

Class

ConnectionTest
Tests Drupal\sqlite\Driver\Database\sqlite\Connection.

Namespace

Drupal\Tests\sqlite\Unit

Code

public static function providerCreateConnectionOptionsFromUrl() : array {
  return [
    'sqlite relative path' => [
      'sqlite://localhost/tmp/test',
      '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.