use Symfony\Component\Workflow\Workflow;
class WorkflowExtensionTest extends TestCase
{ private WorkflowExtension
$extension;
private Transition
$t1;
protected function setUp(): void
{ $places =
['ordered', 'waiting_for_payment', 'processed'
];
$transitions =
[ $this->t1 =
new Transition('t1', 'ordered', 'waiting_for_payment'
),
new Transition('t2', 'waiting_for_payment', 'processed'
),
];
$transitionsMetadata =
new \
SplObjectStorage();
$transitionsMetadata->
attach($this->t1,
['title' => 't1 title'
]);
$metadataStore =
new InMemoryMetadataStore( ['title' => 'workflow title'
],
['orderer' =>
['title' => 'ordered title'
]],
$transitionsMetadata );
$definition =
new Definition($places,
$transitions, null,
$metadataStore);