You are here

public function UpdateSemverCoreTest::testLanguageModuleUpdate in Drupal 9

Checks language module in core package at admin/reports/updates.

File

core/modules/update/tests/src/Functional/UpdateSemverCoreTest.php, line 441

Class

UpdateSemverCoreTest
Tests the Update Manager module through a series of functional tests using mock XML data.

Namespace

Drupal\Tests\update\Functional

Code

public function testLanguageModuleUpdate() {
  $this
    ->setProjectInstalledVersion('8.0.0');

  // Instead of using refreshUpdateStatus(), set these manually.
  $this
    ->config('update.settings')
    ->set('fetch.url', Url::fromRoute('update_test.update_test')
    ->setAbsolute()
    ->toString())
    ->save();
  $this
    ->config('update_test.settings')
    ->set('xml_map', [
    'drupal' => '0.1',
  ])
    ->save();
  $this
    ->drupalGet('admin/reports/updates');
  $this
    ->assertSession()
    ->pageTextContains('Language');
}