You are here

public function DatabaseLegacyTest::testDbUpdate in Drupal 8

Tests the db_update() function.

@expectedDeprecation db_update() is deprecated in drupal:8.0.0. It will be removed from drupal:9.0.0. Instead, get a database connection injected into your service from the container and call call update() on it. For example, $injected_database->update($table, $options). See https://www.drupal.org/node/2993033

File

core/tests/Drupal/KernelTests/Core/Database/DatabaseLegacyTest.php, line 415

Class

DatabaseLegacyTest
Deprecation tests cases for the database layer.

Namespace

Drupal\KernelTests\Core\Database

Code

public function testDbUpdate() {
  $this
    ->assertInstanceOf(Update::class, db_update('test'));
}