function SchemaVersionUpdateTest::testSchemaVersionsIsInt

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'));
}

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