@@ -302,7 +302,15 @@ public function testWorkflows()
302
302
$ this ->assertArrayHasKey ('index_4 ' , $ args );
303
303
$ this ->assertNull ($ args ['index_4 ' ], 'Workflows has eventsToDispatch=null ' );
304
304
305
- $ this ->assertSame (['workflow ' => [['name ' => 'article ' ]], 'workflow.workflow ' => [['name ' => 'article ' ]]], $ container ->getDefinition ('workflow.article ' )->getTags ());
305
+ $ tags = $ container ->getDefinition ('workflow.article ' )->getTags ();
306
+ $ this ->assertArrayHasKey ('workflow ' , $ tags );
307
+ $ this ->assertArrayHasKey ('workflow.workflow ' , $ tags );
308
+ $ this ->assertSame ([['name ' => 'article ' ]], $ tags ['workflow.workflow ' ]);
309
+ $ this ->assertSame ('article ' , $ tags ['workflow ' ][0 ]['name ' ] ?? null );
310
+ $ this ->assertSame ([
311
+ 'title ' => 'article workflow ' ,
312
+ 'description ' => 'workflow for articles ' ,
313
+ ], $ tags ['workflow ' ][0 ]['metadata ' ] ?? null );
306
314
307
315
$ this ->assertTrue ($ container ->hasDefinition ('workflow.article.definition ' ), 'Workflow definition is registered as a service ' );
308
316
@@ -333,7 +341,14 @@ public function testWorkflows()
333
341
$ this ->assertSame ('state_machine.abstract ' , $ container ->getDefinition ('state_machine.pull_request ' )->getParent ());
334
342
$ this ->assertTrue ($ container ->hasDefinition ('state_machine.pull_request.definition ' ), 'State machine definition is registered as a service ' );
335
343
336
- $ this ->assertSame (['workflow ' => [['name ' => 'pull_request ' ]], 'workflow.state_machine ' => [['name ' => 'pull_request ' ]]], $ container ->getDefinition ('state_machine.pull_request ' )->getTags ());
344
+ $ tags = $ container ->getDefinition ('state_machine.pull_request ' )->getTags ();
345
+ $ this ->assertArrayHasKey ('workflow ' , $ tags );
346
+ $ this ->assertArrayHasKey ('workflow.state_machine ' , $ tags );
347
+ $ this ->assertSame ([['name ' => 'pull_request ' ]], $ tags ['workflow.state_machine ' ]);
348
+ $ this ->assertSame ('pull_request ' , $ tags ['workflow ' ][0 ]['name ' ] ?? null );
349
+ $ this ->assertSame ([
350
+ 'title ' => 'workflow title ' ,
351
+ ], $ tags ['workflow ' ][0 ]['metadata ' ] ?? null );
337
352
338
353
$ stateMachineDefinition = $ container ->getDefinition ('state_machine.pull_request.definition ' );
339
354
0 commit comments