public function UpdatePostUpdateFailingTest::testPostUpdate in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/system/src/Tests/Update/UpdatePostUpdateFailingTest.php \Drupal\system\Tests\Update\UpdatePostUpdateFailingTest::testPostUpdate()
Tests hook_post_update_NAME().
File
- core/
modules/ system/ src/ Tests/ Update/ UpdatePostUpdateFailingTest.php, line 30 - Contains \Drupal\system\Tests\Update\UpdatePostUpdateFailingTest.
Class
- UpdatePostUpdateFailingTest
- Tests hook_post_update() when there are failing update hooks.
Namespace
Drupal\system\Tests\UpdateCode
public function testPostUpdate() {
// There are expected to be failed updates.
$this->checkFailedUpdates = FALSE;
$this
->runUpdates();
// There should be no post update hooks registered as being run.
$this
->assertIdentical([], \Drupal::state()
->get('post_update_test_execution', []));
$key_value = \Drupal::keyValue('update__post_update');
$this
->assertEqual([], $key_value
->get('existing_updates'));
}