function TestSetupTraitTest::testGetDatabaseConnection

Same name and namespace in other branches
  1. 10 core/tests/Drupal/KernelTests/Core/Test/TestSetupTraitTest.php \Drupal\KernelTests\Core\Test\TestSetupTraitTest::testGetDatabaseConnection()

@covers ::getDatabaseConnection @group legacy

File

core/tests/Drupal/KernelTests/Core/Test/TestSetupTraitTest.php, line 27

Class

TestSetupTraitTest
Tests the TestSetupTrait trait.

Namespace

Drupal\KernelTests\Core\Test

Code

public function testGetDatabaseConnection() : void {
    $this->expectDeprecation('Drupal\\Core\\Test\\TestSetupTrait::getDatabaseConnection is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. There is no replacement. See https://www.drupal.org/node/3176816');
    $this->assertNotNull($this->getDatabaseConnection());
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.