Skip to content
Snippets Groups Projects

Issue #3389510: Split up update semver tests

1 unresolved thread

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
443 64 * @param string $version
444 65 * The version number.
445 66 */
446 67 abstract protected function setProjectInstalledVersion($version);
  • We now have 6 overrides of this. 2 are exactly the same for contrib and 4 are exactly the same for core. I think this will be hard to keep in-sync in the future.

    Could we just make this non-abstract like this

    protected function setProjectInstalledVersion($version) {
      if ($this->updateProject !== 'drupal') {
        $this->mockInstalledExtensionsInfo([
          $this->updateProject => [
            'project' => $this->updateProject,
            'version' => $version,
            'hidden' => FALSE,
          ],
          // Ensure Drupal core on the same version for all test runs.
          'drupal' => [
            'project' => 'drupal',
            'version' => '8.0.0',
            'hidden' => FALSE,
          ],
        ]);
        $this->mockDefaultExtensionsInfo(['version' => '8.0.0']);
      }
      else {
        $this->mockDefaultExtensionsInfo(['version' => $version]);
      }
    }

    Then we would not need any overrides

  • Actually I made 2 base classes to avoid other duplication in addition. So now this just has 2 overrides.

  • Please register or sign in to reply
  • Ted Bowman added 5 commits

    added 5 commits

    Compare with previous version

  • Ted Bowman added 16 commits

    added 16 commits

    Compare with previous version

  • catch added 1 commit

    added 1 commit

    Compare with previous version

  • Derek Wright added 36 commits

    added 36 commits

    Compare with previous version

  • catch added 23 commits

    added 23 commits

    Compare with previous version

  • closed

  • Please register or sign in to reply
    Loading