You are here

function UpdateCoreTest::testModulePageRunCron in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/update/src/Tests/UpdateCoreTest.php \Drupal\update\Tests\UpdateCoreTest::testModulePageRunCron()

Checks that running cron updates the list of available updates.

File

core/modules/update/src/Tests/UpdateCoreTest.php, line 198
Contains \Drupal\update\Tests\UpdateCoreTest.

Class

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

Namespace

Drupal\update\Tests

Code

function testModulePageRunCron() {
  $this
    ->setSystemInfo('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', array(
    'drupal' => '0.0',
  ))
    ->save();
  $this
    ->cronRun();
  $this
    ->drupalGet('admin/modules');
  $this
    ->assertNoText(t('No update information available.'));
}