You are here

protected function UpdateTestBase::standardTests in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/update/tests/src/Functional/UpdateTestBase.php \Drupal\Tests\update\Functional\UpdateTestBase::standardTests()
  2. 9 core/modules/update/tests/src/Functional/UpdateTestBase.php \Drupal\Tests\update\Functional\UpdateTestBase::standardTests()

Runs a series of assertions that are applicable to all update statuses.

File

core/modules/update/tests/src/Functional/UpdateTestBase.php, line 83

Class

UpdateTestBase
Defines some shared functions used by all update tests.

Namespace

Drupal\Tests\update\Functional

Code

protected function standardTests() {
  $this
    ->assertSession()
    ->responseContains('<h3>Drupal core</h3>');

  // Verify that the link to the Drupal project appears.
  $this
    ->assertSession()
    ->linkExists('Drupal');
  $this
    ->assertSession()
    ->linkByHrefExists('http://example.com/project/drupal');
  $this
    ->assertSession()
    ->pageTextNotContains('No available releases found');
  $this
    ->assertSession()
    ->pageTextContains('Last checked:');

  // No download URLs should be present.
  $this
    ->assertSession()
    ->responseNotContains('.tar.gz');
}