SchemaVersionUpdateTest.php in Drupal 9
File
core/modules/system/tests/src/Functional/Update/SchemaVersionUpdateTest.php
View source
<?php
namespace Drupal\Tests\system\Functional\Update;
use Drupal\FunctionalTests\Update\UpdatePathTestBase;
class SchemaVersionUpdateTest extends UpdatePathTestBase {
protected static $modules = [
'update_test_schema',
];
protected function setDatabaseDumpFiles() {
$this->databaseDumpFiles = [
__DIR__ . '/../../../fixtures/update/drupal-8.8.0.bare.standard.php.gz',
__DIR__ . '/../../../fixtures/update/drupal-8.update-schema-version-int.php',
];
}
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'));
}
}