function PgsqlDriverLegacyTest::testDeprecationUpsert

Same name in other branches
  1. 10 core/modules/pgsql/tests/src/Kernel/pgsql/PgsqlDriverLegacyTest.php \Drupal\Tests\pgsql\Kernel\pgsql\PgsqlDriverLegacyTest::testDeprecationUpsert()

@covers Drupal\Core\Database\Driver\pgsql\Upsert

File

core/modules/pgsql/tests/src/Kernel/pgsql/PgsqlDriverLegacyTest.php, line 100

Class

PgsqlDriverLegacyTest
Tests the deprecations of the PostgreSQL database driver classes in Core.

Namespace

Drupal\Tests\pgsql\Kernel\pgsql

Code

public function testDeprecationUpsert() {
    $this->expectDeprecation('\\Drupal\\Core\\Database\\Driver\\pgsql\\Upsert is deprecated in drupal:9.4.0 and is removed from drupal:11.0.0. The PostgreSQL database driver has been moved to the pgsql module. See https://www.drupal.org/node/3129492');
    $upsert = new Upsert($this->connection, 'test');
    $this->assertInstanceOf(Upsert::class, $upsert);
}

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