make(Registry::class, [ 'steps' => ['core:root' => new RootStep()], ]); $validator = $this->make(Validator::class, [ 'validate' => Expected::once(), ]); $rule = new ValidStepArgsRule($registry, $validator); $automation = $this->getAutomation(); (new AutomationWalker())->walk($automation, [$rule]); } public function testItSkipsArgsValidationForNonExistentStep(): void { $registry = $this->make(Registry::class); $validator = $this->make(Validator::class, [ 'validate' => Expected::never(), ]); $rule = new ValidStepArgsRule($registry, $validator); $automation = $this->getAutomation(); (new AutomationWalker())->walk($automation, [$rule]); } private function getAutomation(): Automation { return $this->make(Automation::class, [ 'getSteps' => [ 'root' => new Step('root', 'root', 'core:root', [], []), ], ]); } }