Skip to content
Snippets Groups Projects

Issue #3246673: Move PendingUpdatesValidator into Package Manager

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
22 protected static $modules = ['package_manager'];
23
24 /**
25 * Runs the validator under test, and asserts its results match expectations.
26 *
27 * @param \Drupal\package_manager\ValidationResult[] $expected_results
28 * The expected validation results.
29 */
30 private function assertResults(array $expected_results): void {
31 $stage = $this->prophesize('\Drupal\package_manager\Stage');
32 $event = new PreCreateEvent($stage->reveal());
33 $this->container->get('package_manager.validator.pending_updates')
34 ->validateStage($event);
35
36 $this->assertValidationResultsEqual($expected_results, $event->getResults());
37 }
  • Comment on lines +30 to +37

    I didn't catch this for \Drupal\Tests\package_manager\Kernel\ComposerExecutableValidatorTest::assertResults but this doesn't test the service is set up correctly as a listener. Maybe we could change is in the next MR for all the validators. we could have base kernel test with assertEventResults(string $eventClass) or something that would actually dispatch the event and get the results.

  • changed this line in version 4 of the diff

  • Please register or sign in to reply
  • Adam G-H added 1 commit

    added 1 commit

    Compare with previous version

  • Adam G-H added 1 commit

    added 1 commit

    • 89d4a932 - Refactor tests to use more consistent validation

    Compare with previous version

  • Adam G-H added 1 commit

    added 1 commit

    Compare with previous version

  • Adam G-H added 1 commit
  • Ted Bowman
  • Adam G-H added 1 commit

    added 1 commit

    Compare with previous version

  • Adam G-H added 1 commit

    added 1 commit

    Compare with previous version

  • merged

  • Please register or sign in to reply
    Loading