function InvalidUpdateHookTest::testInvalidUpdateHook

Same name in other branches
  1. 9 core/modules/system/tests/src/Functional/UpdateSystem/InvalidUpdateHookTest.php \Drupal\Tests\system\Functional\UpdateSystem\InvalidUpdateHookTest::testInvalidUpdateHook()
  2. 8.9.x core/modules/system/tests/src/Functional/UpdateSystem/InvalidUpdateHookTest.php \Drupal\Tests\system\Functional\UpdateSystem\InvalidUpdateHookTest::testInvalidUpdateHook()
  3. 10 core/modules/system/tests/src/Functional/UpdateSystem/InvalidUpdateHookTest.php \Drupal\Tests\system\Functional\UpdateSystem\InvalidUpdateHookTest::testInvalidUpdateHook()

File

core/modules/system/tests/src/Functional/UpdateSystem/InvalidUpdateHookTest.php, line 61

Class

InvalidUpdateHookTest
Tests that hook_update_8000() is disallowed.

Namespace

Drupal\Tests\system\Functional\UpdateSystem

Code

public function testInvalidUpdateHook() : void {
    // Confirm that a module with hook_update_8000() cannot be updated.
    $this->drupalLogin($this->updateUser);
    $this->drupalGet($this->updateUrl);
    $this->updateRequirementsProblem();
    $this->clickLink('Continue');
    $this->assertSession()
        ->pageTextContains('Some of the pending updates cannot be applied because their dependencies were not met.');
}

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