You are here

public function InvalidUpdateHookTest::testInvalidUpdateHook in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/system/tests/src/Functional/UpdateSystem/InvalidUpdateHookTest.php \Drupal\Tests\system\Functional\UpdateSystem\InvalidUpdateHookTest::testInvalidUpdateHook()
  2. 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 58

Class

InvalidUpdateHookTest
Tests that a module implementing hook_update_8000() causes an error to be displayed on update.

Namespace

Drupal\Tests\system\Functional\UpdateSystem

Code

public function testInvalidUpdateHook() {

  // Confirm that a module with hook_update_8000() cannot be updated.
  $this
    ->drupalLogin($this->updateUser);
  $this
    ->drupalGet($this->updateUrl);
  $this
    ->updateRequirementsProblem();
  $this
    ->clickLink(t('Continue'));
  $this
    ->assertText(t('Some of the pending updates cannot be applied because their dependencies were not met.'));
}