make(Workflow::class, ['getSteps' => [ 'root' => $this->createStep('a'), ]]); $this->expectException(UnexpectedValueException::class); $this->expectExceptionMessage('Invalid workflow structure: TODO'); (new WorkflowWalker())->walk($workflow, [new ConsistentStepMapRule()]); } public function testItPassesWithCorrectKeyValuePair(): void { $workflow = $this->make(Workflow::class, ['getSteps' => [ 'root' => $this->createStep('root'), ]]); (new WorkflowWalker())->walk($workflow, [new ConsistentStepMapRule()]); // no exception thrown } }