You are here

protected function UpdateScriptTest::assertUpdateWithNoError in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/system/tests/src/Functional/UpdateSystem/UpdateScriptTest.php \Drupal\Tests\system\Functional\UpdateSystem\UpdateScriptTest::assertUpdateWithNoError()
  2. 10 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\UpdateSystem

Code

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);
}