You are here

protected function UpdatePathTestTrait::ensureUpdatesToRun in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/UpdatePathTestTrait.php \Drupal\Tests\UpdatePathTestTrait::ensureUpdatesToRun()
  2. 9 core/tests/Drupal/Tests/UpdatePathTestTrait.php \Drupal\Tests\UpdatePathTestTrait::ensureUpdatesToRun()

Installs the update_script_test module and makes an update available.

5 calls to UpdatePathTestTrait::ensureUpdatesToRun()
BrokenCacheUpdateTest::setUp in core/modules/system/tests/src/Functional/UpdateSystem/BrokenCacheUpdateTest.php
DatabaseVersionCheckUpdateTest::setUp in core/modules/system/tests/src/Functional/Update/DatabaseVersionCheckUpdateTest.php
EntityUpdateInitialTest::setUp in core/modules/system/tests/src/Functional/UpdateSystem/EntityUpdateInitialTest.php
UpdatePathTestJavaScriptTest::setUp in core/modules/system/tests/src/Functional/UpdateSystem/UpdatePathTestJavaScriptTest.php
UpdatePathWithBrokenRoutingTest::setUp in core/modules/system/tests/src/Functional/UpdateSystem/UpdatePathWithBrokenRoutingTest.php

File

core/tests/Drupal/Tests/UpdatePathTestTrait.php, line 173

Class

UpdatePathTestTrait
Trait UpdatePathTestTrait.

Namespace

Drupal\Tests

Code

protected function ensureUpdatesToRun() {
  \Drupal::service('module_installer')
    ->install([
    'update_script_test',
  ]);

  // Reset the schema so there is an update to run.
  \Drupal::service('update.update_hook_registry')
    ->setInstalledVersion('update_script_test', 8000);
}