You are here

public function SchemaVersionUpdateTest::testSchemaVersionsIsInt in Drupal 9

Tests that upgrade converted string value to integer.

File

core/modules/system/tests/src/Functional/Update/SchemaVersionUpdateTest.php, line 33

Class

SchemaVersionUpdateTest
Tests that updates clean-up non-integer schema version.

Namespace

Drupal\Tests\system\Functional\Update

Code

public function testSchemaVersionsIsInt() {
  $this
    ->assertSame('8901', \Drupal::keyValue('system.schema')
    ->get('update_test_schema'));
  $this
    ->runUpdates();
  $this
    ->assertSame(8901, \Drupal::keyValue('system.schema')
    ->get('update_test_schema'));
}