function ConnectionTest::testDeprecationOfRootInConnectionOptionsFromUrl
Confirms deprecation of the $root argument.
Attributes
#[IgnoreDeprecations]
File
- 
              core/modules/ sqlite/ tests/ src/ Unit/ ConnectionTest.php, line 61 
Class
Namespace
Drupal\Tests\sqlite\UnitCode
public function testDeprecationOfRootInConnectionOptionsFromUrl() : void {
  $this->expectDeprecation('Passing the $root value to Drupal\\sqlite\\Driver\\Database\\sqlite\\Connection::createConnectionOptionsFromUrl() is deprecated in drupal:11.2.0 and will be removed in drupal:12.0.0. There is no replacement. See https://www.drupal.org/node/3511287');
  $root = dirname(__DIR__, 8);
  // @phpstan-ignore class.notFound
  $sqlite_connection = new Connection($this->createMock(\PHP_VERSION_ID >= 80400 ? Sqlite::class : StubPDO::class), []);
  $database = $sqlite_connection->createConnectionOptionsFromUrl('sqlite://localhost/tmp/test', $root);
  $this->assertEquals('sqlite', $database['driver']);
  $this->assertEquals('tmp/test', $database['database']);
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
