Skip to content
Snippets Groups Projects

Issue #3382942: Eliminate dependencies on Composer Stager internals

Merged Issue #3382942: Eliminate dependencies on Composer Stager internals
All threads resolved!
Merged Ted Bowman requested to merge issue/automatic_updates-3382942:3382942-round-3 into 3.0.x
All threads resolved!
@@ -169,16 +169,17 @@ class StageEventsTest extends PackageManagerKernelTestBase implements EventSubsc
$warning = ValidationResult::createWarning([
t('The path ahead is scary...'),
]);
$excluded_paths = $this->createMock(PathListInterface::class);
// Status check events can accept both errors and warnings.
$event = new StatusCheckEvent($stage, NULL);
$event = new StatusCheckEvent($stage, $excluded_paths);
$event->addResult($error);
$event->addResult($warning);
$this->assertSame([$error, $warning], $event->getResults());
// Other stage events will accept errors, but throw an exception if you try
// to add a warning.
$event = new PreCreateEvent($stage, $this->createMock(PathListInterface::class));
$event = new PreCreateEvent($stage, $excluded_paths);
$event->addResult($error);
$this->assertSame([$error], $event->getResults());
$this->expectException(\InvalidArgumentException::class);
Loading