You are here

protected function DbUpdatesTrait::applyUpdates in Drupal 8

Same name in this branch
  1. 8 core/modules/system/src/Tests/Update/DbUpdatesTrait.php \Drupal\system\Tests\Update\DbUpdatesTrait::applyUpdates()
  2. 8 core/modules/system/tests/src/Functional/Update/DbUpdatesTrait.php \Drupal\Tests\system\Functional\Update\DbUpdatesTrait::applyUpdates()

Applies any pending DB updates through the Update UI.

3 calls to DbUpdatesTrait::applyUpdates()
UpdateApiEntityDefinitionUpdateTest::testMultipleUpdates in core/modules/system/tests/src/Functional/Entity/Update/UpdateApiEntityDefinitionUpdateTest.php
Tests that multiple updates applied in bulk work as expected.
UpdateApiEntityDefinitionUpdateTest::testSingleUpdates in core/modules/system/tests/src/Functional/Entity/Update/UpdateApiEntityDefinitionUpdateTest.php
Tests that individual updates applied sequentially work as expected.
UpdateApiEntityDefinitionUpdateTest::testStatusReport in core/modules/system/tests/src/Functional/Entity/Update/UpdateApiEntityDefinitionUpdateTest.php
Tests that entity updates are correctly reported in the status report page.

File

core/modules/system/tests/src/Functional/Update/DbUpdatesTrait.php, line 37

Class

DbUpdatesTrait
Provides methods to conditionally enable db update functions and apply pending db updates through the Update UI.

Namespace

Drupal\Tests\system\Functional\Update

Code

protected function applyUpdates() {
  $this
    ->drupalGet(Url::fromRoute('system.db_update'));
  $this
    ->updateRequirementsProblem();
  $this
    ->clickLink($this
    ->t('Continue'));
  $this
    ->clickLink($this
    ->t('Apply pending updates'));
  $this
    ->checkForMetaRefresh();
}