Issue #3246673: Move PendingUpdatesValidator into Package Manager
Merged
requested to merge issue/automatic_updates-3246673:3246673-move-pendingupdatesvalidator-into into 8.x-2.x
1 unresolved thread
Merge request reports
Activity
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 withassertEventResults(string $eventClass)
or something that would actually dispatch the event and get the results. changed this line in version 4 of the diff
added 1 commit
- 89d4a932 - Refactor tests to use more consistent validation
- Resolved by Adam G-H
Please register or sign in to reply