private function CoreUpdateTest::assertUpdateSuccessful in Automatic Updates 8.2
Asserts that Drupal core was successfully updated.
2 calls to CoreUpdateTest::assertUpdateSuccessful()
- CoreUpdateTest::testCron in tests/
src/ Build/ CoreUpdateTest.php - Tests an end-to-end core update via cron.
- CoreUpdateTest::testUi in tests/
src/ Build/ CoreUpdateTest.php - Tests an end-to-end core update via the UI.
File
- tests/
src/ Build/ CoreUpdateTest.php, line 261
Class
- CoreUpdateTest
- Tests an end-to-end update of Drupal core.
Namespace
Drupal\Tests\automatic_updates\BuildCode
private function assertUpdateSuccessful() : void {
// The update form should not have any available updates.
// @todo Figure out why this assertion fails when the batch processor
// redirects directly to the update form, instead of update.status, when
// updating via the UI.
$this
->visit('/admin/modules/automatic-update');
$this
->getMink()
->assertSession()
->pageTextContains('No update available');
// The status page should report that we're running Drupal 9.8.1.
$this
->assertCoreVersion('9.8.1');
// The fake placeholder text from ::getConfigurationForUpdate() should be
// present in the README.
$placeholder = file_get_contents($this
->getWebRoot() . '/core/README.txt');
$this
->assertSame('Placeholder for Drupal core 9.8.1.', $placeholder);
}