function ConnectionTest::testDeprecatedTablePrefix

Tests deprecation of ::tablePrefix().

@group legacy

File

core/tests/Drupal/KernelTests/Core/Database/ConnectionTest.php, line 199

Class

ConnectionTest
Tests of the core database system.

Namespace

Drupal\KernelTests\Core\Database

Code

public function testDeprecatedTablePrefix() : void {
    $this->expectDeprecation('Drupal\\Core\\Database\\Connection::tablePrefix() is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. Instead, you should just use Connection::getPrefix(). See https://www.drupal.org/node/3260849');
    $this->assertIsString($this->connection
        ->tablePrefix());
}

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