function UpdateScriptTest::assertUpdateWithNoError
Same name in other branches
- 9 core/modules/system/tests/src/Functional/UpdateSystem/UpdateScriptTest.php \Drupal\Tests\system\Functional\UpdateSystem\UpdateScriptTest::assertUpdateWithNoError()
Asserts a particular error is not shown on update and status report pages.
Parameters
string $unexpected_error_text: The error text that should not be shown.
string $extension_type: The extension type, either 'module' or 'theme'.
string $extension_machine_name: The extension machine name.
Throws
\Behat\Mink\Exception\ResponseTextException
2 calls to UpdateScriptTest::assertUpdateWithNoError()
- UpdateScriptTest::testExtensionCompatibilityChange in core/
modules/ system/ tests/ src/ Functional/ UpdateSystem/ UpdateScriptTest.php - Tests that extension compatibility changes are handled correctly.
- UpdateScriptTest::testMissingExtension in core/
modules/ system/ tests/ src/ Functional/ UpdateSystem/ UpdateScriptTest.php - Tests that a missing extension prevents updates.
File
-
core/
modules/ system/ tests/ src/ Functional/ UpdateSystem/ UpdateScriptTest.php, line 828
Class
- UpdateScriptTest
- Tests the update script access and functionality.
Namespace
Drupal\Tests\system\Functional\UpdateSystemCode
protected function assertUpdateWithNoError($unexpected_error_text, $extension_type, $extension_machine_name) {
$assert_session = $this->assertSession();
$this->drupalGet($this->statusReportUrl);
$this->assertSession()
->pageTextNotContains($unexpected_error_text);
$this->drupalGet($this->updateUrl, [
'external' => TRUE,
]);
$this->assertSession()
->pageTextNotContains($unexpected_error_text);
$this->updateRequirementsProblem();
$this->clickLink(t('Continue'));
$assert_session->pageTextContains('No pending updates.');
$this->assertInstalledExtensionConfig($extension_type, $extension_machine_name);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.