public function UpdateCoreTest::testModulePageRegularUpdate in Drupal 8
Checks the messages at admin/modules when an update is missing.
File
- core/modules/ update/ tests/ src/ Functional/ UpdateCoreTest.php, line 704 
Class
- UpdateCoreTest
- Tests the Update Manager module through a series of functional tests using mock XML data.
Namespace
Drupal\Tests\update\FunctionalCode
public function testModulePageRegularUpdate() {
  $this
    ->setSystemInfo('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
    ->clickLink(t('Check manually'));
  $this
    ->checkForMetaRefresh();
  $this
    ->assertText(t('Checked available update data for one project.'));
  $this
    ->drupalGet('admin/modules');
  $this
    ->assertText(t('There are updates available for your version of Drupal.'));
  $this
    ->assertNoText(t('There is a security update available for your version of Drupal.'));
}