function UpdateCoreTest::testSecurityUpdateAvailable

Tests the Update Manager module when a security update is available.

File

drupal/core/modules/update/lib/Drupal/update/Tests/UpdateCoreTest.php, line 67
Definition of Drupal\update\Tests\UpdateCoreTest.

Class

UpdateCoreTest
Tests behavior related to discovering and listing updates to Drupal core.

Namespace

Drupal\update\Tests

Code

function testSecurityUpdateAvailable() {
  $this
    ->setSystemInfo7_0();
  $this
    ->refreshUpdateStatus(array(
    'drupal' => '2-sec',
  ));
  $this
    ->standardTests();
  $this
    ->assertNoText(t('Up to date'));
  $this
    ->assertNoText(t('Update available'));
  $this
    ->assertText(t('Security update required!'));
  $this
    ->assertRaw(l('7.2', 'http://example.com/drupal-7-2-release'), 'Link to release appears.');
  $this
    ->assertRaw(l(t('Download'), 'http://example.com/drupal-7-2.tar.gz'), 'Link to download appears.');
  $this
    ->assertRaw(l(t('Release notes'), 'http://example.com/drupal-7-2-release'), 'Link to release notes appears.');
}