Skip to content
Snippets Groups Projects

Issue #3100386: Create contrib update module test cases that use semantic versioning

Issue #3100386: Create contrib update module test cases that use semantic versioning

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
436 * They both have an '8.0.2' release that is unpublished and an '8.1.0'
437 * release that is published and is the expected update.
438 */
439 public function testRevokedRelease() {
440 foreach (['1.0', '1.0-unsupported'] as $fixture) {
441 $this->setProjectInstalledVersion('8.0.2');
442 $this->refreshUpdateStatus([$this->updateProject => $fixture]);
443 $this->standardTests();
444 $this->confirmRevokedStatus('8.0.2', '8.1.0', 'Recommended version:');
445 }
446 }
447
448 /**
449 * Checks that Drupal recovers after problems connecting to update server.
450 */
451 public function testBrokenThenFixedUpdates() {
  • 155 * Tests the Update Manager module when a major update is available.
    156 */
    157 public function testMajorUpdateAvailable() {
    158 foreach ([0, 1] as $minor_version) {
    159 foreach ([0, 1] as $patch_version) {
    160 foreach (['-alpha1', '-beta1', ''] as $extra_version) {
    161 $this->setProjectInstalledVersion("8.$minor_version.$patch_version" . $extra_version);
    162 $this->refreshUpdateStatus([$this->updateProject => '9']);
    163 $this->standardTests();
    164 $this->drupalGet('admin/reports/updates');
    165 $this->clickLink(t('Check manually'));
    166 $this->checkForMetaRefresh();
    167 $this->assertUpdateTableTextNotContains('Security update required!');
    168 $this->assertUpdateTableElementContains(Link::fromTextAndUrl('9.0.0', Url::fromUri("http://example.com/drupal-9-0-0-release"))->toString());
    169 $this->assertUpdateTableElementContains(Link::fromTextAndUrl(t('Download'), Url::fromUri("http://example.com/drupal-9-0-0.tar.gz"))->toString());
    170 $this->assertUpdateTableElementContains(Link::fromTextAndUrl(t('Release notes'), Url::fromUri("http://example.com/drupal-9-0-0-release"))->toString());
  • Ted Bowman
  • 25
    26 /**
    27 * {@inheritdoc}
    28 */
    29 protected $defaultTheme = 'stark';
    30
    31 /**
    32 * {@inheritdoc}
    33 */
    34 protected $updateTableLocator = 'table.update';
    13 class UpdateCoreTest extends UpdateSemverTestBase {
    35 14
    36 15 /**
    37 16 * {@inheritdoc}
    38 17 */
    39 protected $updateProject = 'drupal';
  • 15 protected $updateTableLocator = 'table.update:nth-of-type(2)';
    16
    17 /**
    18 * {@inheritdoc}
    19 */
    20 protected $updateProject = 'semver_test';
    21
    22 /**
    23 * {@inheritdoc}
    24 */
    25 protected $projectTitle = 'Semver Test';
    26
    27 /**
    28 * {@inheritdoc}
    29 */
    30 public static $modules = ['semver_test'];
  • Ted Bowman added 5 commits

    added 5 commits

    • 64205731 - renamed: UpdateCoreTest.php -> UpdateSemverCoreTest.php
    • 0e108193 - reorder functions in UpdateTestBase.php
    • 1ea998bd - Remove t() calls
    • 867fdcea - Remove test methods that should only be in core test
    • 563133bf - docblock line length

    Compare with previous version

  • Ted Bowman added 1 commit

    added 1 commit

    • 43e7cc20 - Move properties to UpdateSemverCoreTest.php when specific to core

    Compare with previous version

  • Ted Bowman added 1 commit

    added 1 commit

    Compare with previous version

  • Please register or sign in to reply
    Loading