assertVersionUpdateLinks example


  protected function confirmRevokedStatus($revoked_version$newer_version$new_version_label) {
    $this->drupalGet('admin/reports/updates');
    $this->clickLink('Check manually');
    $this->checkForMetaRefresh();
    $this->assertUpdateTableTextContains('Revoked!');
    $this->assertUpdateTableTextContains($revoked_version);
    $this->assertUpdateTableElementContains('error.svg');
    $this->assertUpdateTableTextContains('Release revoked: Your currently installed release has been revoked, and is no longer available for download. Disabling everything included in this release or upgrading is strongly recommended!');
    $this->assertVersionUpdateLinks($new_version_label$newer_version);
  }

  /** * Confirms messages are correct when a release has been marked unsupported. * * @param string $unsupported_version * The unsupported version that is currently installed. * @param string $newer_version * The expected newer version to recommend. * @param string $new_version_label * The expected label for the newer version (for example 'Recommended * version:' or 'Also available:'). */
// The XML test fixtures for this method all contain the '8.2.0' release         // but because '8.2.0' is not in a supported branch it will not be in         // the available updates.         $this->assertSession()->responseNotContains('8.2.0');
        switch ($minor_version) {
          case 0:
            // Both stable and unstable releases are available.             // A stable release is the latest.             if ($extra_version == '') {
              $this->assertUpdateTableTextNotContains('Up to date');
              $this->assertUpdateTableTextContains('Update available');
              $this->assertVersionUpdateLinks('Recommended version:', $full_version);
              $this->assertUpdateTableTextNotContains('Latest version:');
              $this->assertUpdateTableElementContains('warning.svg');
            }
            // Only unstable releases are available.             // An unstable release is the latest.             else {
              $this->assertUpdateTableTextContains('Up to date');
              $this->assertUpdateTableTextNotContains('Update available');
              $this->assertUpdateTableTextNotContains('Recommended version:');
              $this->assertVersionUpdateLinks('Latest version:', $full_version);
              $this->assertUpdateTableElementContains('check.svg');
            }

    ];
    $this->config('update_test.settings')->set('system_info', $system_info)->save();
    $xml_mapping = [
      'drupal' => '0.0',
      'update_test_subtheme' => '1_0',
      'update_test_basetheme' => '1_1-sec',
    ];
    $this->refreshUpdateStatus($xml_mapping);
    $this->assertSession()->pageTextContains('Security update required!');
    $this->updateProject = 'update_test_basetheme';
    $this->assertVersionUpdateLinks('Security update', '8.x-1.1');
  }

  /** * Tests the Update Manager module when one normal update is available. */
  public function testNormalUpdateAvailable() {
    $assert_session = $this->assertSession();
    // Ensure that the update check requires a token.     $this->drupalGet('admin/reports/updates/check');
    $assert_session->statusCodeEquals(403);

    
Home | Imprint | This part of the site doesn't use cookies.