function UpdateDeprecationTest::testDrupalGetInstalledSchemaVersion

Deprecation testing for drupal installed schema version functions.

See also

drupal_get_installed_schema_version()

drupal_set_installed_schema_version()

File

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

Class

UpdateDeprecationTest
Tests deprecated update.inc functions.

Namespace

Drupal\KernelTests\Core\Extension

Code

public function testDrupalGetInstalledSchemaVersion() {
    $this->expectDeprecation('drupal_get_installed_schema_version() is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use \\Drupal\\Core\\Update\\UpdateHookRegistry::getInstalledVersion() or \\Drupal\\Core\\Update\\UpdateHookRegistry::getAllInstalledVersions() instead. See https://www.drupal.org/node/2444417');
    $this->assertIsArray(drupal_get_installed_schema_version(NULL, TRUE, TRUE));
    $this->expectDeprecation('drupal_set_installed_schema_version() is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use \\Drupal\\Core\\Update\\UpdateHookRegistry::setInstalledVersion() instead. See https://www.drupal.org/node/2444417');
    drupal_set_installed_schema_version('system', 8001);
}

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