You are here

public function UpdateDeprecationTest::testUpdateSetSchema in Drupal 9

Tests update_set_schema() function.

File

core/tests/Drupal/KernelTests/Core/Extension/UpdateDeprecationTest.php, line 39

Class

UpdateDeprecationTest
Tests deprecated update.inc functions.

Namespace

Drupal\KernelTests\Core\Extension

Code

public function testUpdateSetSchema() {
  $this
    ->expectDeprecation('update_set_schema() is deprecated in drupal:9.2.0 and is removed from drupal:10.0.0. No direct replacement is provided. See https://www.drupal.org/node/3210925');
  update_set_schema('update_test_schema', 8003);

  // Ensure schema has changed.
  $this
    ->assertEquals(8003, \Drupal::keyValue('system.schema')
    ->get('update_test_schema'));
}