function StatementWrapperLegacyTest::setUp

Overrides DatabaseTestBase::setUp

File

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

Class

StatementWrapperLegacyTest
Tests the deprecations of the StatementWrapper class.

Namespace

Drupal\KernelTests\Core\Database

Code

protected function setUp() : void {
    parent::setUp();
    $this->statement = $this->connection
        ->prepareStatement('SELECT id FROM {test}', []);
    if (!$this->statement instanceof StatementWrapper) {
        $this->markTestSkipped('This test only works for drivers implementing Drupal\\Core\\Database\\StatementWrapper.');
    }
}

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