You are here

function InvalidUpdateHookTest::testInvalidUpdateHook in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/modules/system/src/Tests/Update/InvalidUpdateHookTest.php \Drupal\system\Tests\Update\InvalidUpdateHookTest::testInvalidUpdateHook()

File

core/modules/system/src/Tests/Update/InvalidUpdateHookTest.php, line 50
Contains \Drupal\system\Tests\Update\InvalidUpdateHookTest.

Class

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

Namespace

Drupal\system\Tests\Update

Code

function testInvalidUpdateHook() {

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