You are here

public function StatementWrapperLegacyTest::testQueryString in Drupal 9

@covers ::getQueryString

File

core/tests/Drupal/KernelTests/Core/Database/StatementWrapperLegacyTest.php, line 32

Class

StatementWrapperLegacyTest
Tests the deprecations of the StatementWrapper class.

Namespace

Drupal\KernelTests\Core\Database

Code

public function testQueryString() {
  $this
    ->expectDeprecation('StatementWrapper::$queryString should not be accessed in drupal:9.1.0 and will error in drupal:10.0.0. Access the client-level statement object via ::getClientStatement(). See https://www.drupal.org/node/3177488');
  $this
    ->assertStringContainsString('SELECT * FROM ', $this->statement->queryString);
  $this
    ->assertStringContainsString('SELECT * FROM ', $this->statement
    ->getQueryString());
}