You are here

public function UpdateSemverCoreTest::testModulePageRunCron in Drupal 9

Checks that running cron updates the list of available updates.

File

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

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 testModulePageRunCron() {
  $this
    ->setProjectInstalledVersion('8.0.0');
  $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.0',
  ])
    ->save();
  $this
    ->cronRun();
  $this
    ->drupalGet('admin/modules');
  $this
    ->assertSession()
    ->pageTextNotContains('No update information available.');
}