createWorkflow([ 'root' => ['a', 'a'], 'a' => [], ]); $this->expectException(UnexpectedValueException::class); $this->expectExceptionMessage('Invalid automation structure: Duplicate next step definition found'); (new WorkflowWalker())->walk($workflow, [new NoDuplicateEdgesRule()]); } public function testItPassesWithSingleEdges(): void { $workflow = $this->createWorkflow([ 'root' => ['a'], 'a' => ['b'], 'b' => ['c'], 'c' => [], ]); (new WorkflowWalker())->walk($workflow, [new NoDuplicateEdgesRule()]); // no exception thrown } }