Issue #3100386: Create contrib update module test cases that use semantic versioning
4 open threads
Merge request reports
Activity
added 1 commit
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() { Since this test has nothing to do with matching semver releases it should remain in the core test only until the follow up #3127177: Move test methods not directly related to updates for the Drupal project into their own class
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()); 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']; added 1 commit
- 43e7cc20 - Move properties to UpdateSemverCoreTest.php when specific to core
Please register or sign in to reply