function UpdateMiscTest::testModulePageRunCron

Same name in other branches
  1. 10 core/modules/update/tests/src/Functional/UpdateMiscTest.php \Drupal\Tests\update\Functional\UpdateMiscTest::testModulePageRunCron()

Checks that running cron updates the list of available updates.

File

core/modules/update/tests/src/Functional/UpdateMiscTest.php, line 206

Class

UpdateMiscTest
Tests general functionality of the Update module.

Namespace

Drupal\Tests\update\Functional

Code

public function testModulePageRunCron() : void {
    $this->config('update.settings')
        ->set('fetch.url', Url::fromRoute('update_test.update_test')->setAbsolute()
        ->toString())
        ->save();
    $this->mockReleaseHistory([
        'drupal' => '8.0.0',
    ]);
    $this->cronRun();
    $this->drupalGet('admin/modules');
    $this->assertSession()
        ->pageTextNotContains('No update information available.');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.