function UpdatePostUpdateExceptionTest::testPostUpdate
Same name in other branches
- 9 core/modules/system/tests/src/Functional/UpdateSystem/UpdatePostUpdateExceptionTest.php \Drupal\Tests\system\Functional\UpdateSystem\UpdatePostUpdateExceptionTest::testPostUpdate()
- 11.x core/modules/system/tests/src/Functional/UpdateSystem/UpdatePostUpdateExceptionTest.php \Drupal\Tests\system\Functional\UpdateSystem\UpdatePostUpdateExceptionTest::testPostUpdate()
Tests hook_post_update_NAME().
File
-
core/
modules/ system/ tests/ src/ Functional/ UpdateSystem/ UpdatePostUpdateExceptionTest.php, line 55
Class
- UpdatePostUpdateExceptionTest
- Tests hook_post_update() when there is an exception in a post update.
Namespace
Drupal\Tests\system\Functional\UpdateSystemCode
public function testPostUpdate() : void {
// There are expected to be failed updates.
$this->checkFailedUpdates = FALSE;
$this->runUpdates();
$this->assertSession()
->pageTextContains('Failed: RuntimeException: This post update fails in post_update_test_failing_post_update_exception()');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.