function UpdatePostUpdateFailingTest::testPostUpdate
Same name in other branches
- 9 core/modules/system/tests/src/Functional/UpdateSystem/UpdatePostUpdateFailingTest.php \Drupal\Tests\system\Functional\UpdateSystem\UpdatePostUpdateFailingTest::testPostUpdate()
- 8.9.x core/modules/system/tests/src/Functional/UpdateSystem/UpdatePostUpdateFailingTest.php \Drupal\Tests\system\Functional\UpdateSystem\UpdatePostUpdateFailingTest::testPostUpdate()
- 11.x core/modules/system/tests/src/Functional/UpdateSystem/UpdatePostUpdateFailingTest.php \Drupal\Tests\system\Functional\UpdateSystem\UpdatePostUpdateFailingTest::testPostUpdate()
Tests hook_post_update_NAME().
File
-
core/
modules/ system/ tests/ src/ Functional/ UpdateSystem/ UpdatePostUpdateFailingTest.php, line 55
Class
- UpdatePostUpdateFailingTest
- Tests hook_post_update() when there are failing update hooks.
Namespace
Drupal\Tests\system\Functional\UpdateSystemCode
public function testPostUpdate() : void {
// There are expected to be failed updates.
$this->checkFailedUpdates = FALSE;
$this->runUpdates();
// There should be no post update hooks registered as being run.
$this->assertSame([], \Drupal::state()->get('post_update_test_execution', []));
$key_value = \Drupal::keyValue('update__post_update');
$this->assertEquals([], $key_value->get('existing_updates', []));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.