You are here

protected function DbUpdatesTrait::enableUpdates in Drupal 8

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

Enables db updates until the specified index.

Parameters

string $module: The name of the module defining the update functions.

string $group: A name identifying the group of update functions to enable.

$index: The index of the last update function to run.

4 calls to DbUpdatesTrait::enableUpdates()
EntityUpdateToPublishableTest::testConvertToPublishable in core/modules/system/tests/src/Functional/Update/EntityUpdateToPublishableTest.php
Tests the conversion of an entity type to be publishable.
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 30

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 enableUpdates($module, $group, $index) {
  $this->container
    ->get('state')
    ->set($module . '.db_updates.' . $group, $index);
}