public static function UpdatePathTestInstallHelper::setSchemaVersion in Style Switcher 3.0.x
Same name and namespace in other branches
- 8.2 tests/src/Functional/Update/UpdatePathTestInstallHelper.php \Drupal\Tests\styleswitcher\Functional\Update\UpdatePathTestInstallHelper::setSchemaVersion()
Sets a schema version for a module or profile.
Parameters
string $name: Extension name.
int $version: Version to set, e.g. 8000.
1 call to UpdatePathTestInstallHelper::setSchemaVersion()
- drupal-8.8.0.styleswitcher.php in tests/
fixtures/ update/ 8201/ drupal-8.8.0.styleswitcher.php - DB additions for the update path testing of styleswitcher_update_8201().
File
- tests/
src/ Functional/ Update/ UpdatePathTestInstallHelper.php, line 72
Class
- UpdatePathTestInstallHelper
- Helps install database additions for a testing of update paths.
Namespace
Drupal\Tests\styleswitcher\Functional\UpdateCode
public static function setSchemaVersion(string $name, int $version) {
static::getConnection()
->merge('key_value')
->condition('collection', 'system.schema')
->condition('name', $name)
->fields([
'collection' => 'system.schema',
'name' => $name,
'value' => serialize($version),
])
->execute();
}