@@ -305,7 +305,12 @@ public function testWorkflows()
305
305
$ this ->assertArrayHasKey ('index_4 ' , $ args );
306
306
$ this ->assertNull ($ args ['index_4 ' ], 'Workflows has eventsToDispatch=null ' );
307
307
308
- $ this ->assertSame (['workflow ' => [['name ' => 'article ' ]], 'workflow.workflow ' => [['name ' => 'article ' ]]], $ container ->getDefinition ('workflow.article ' )->getTags ());
308
+ $ tags = $ container ->getDefinition ('workflow.article ' )->getTags ();
309
+ $ this ->assertArrayHasKey ('workflow ' , $ tags );
310
+ $ this ->assertArrayHasKey ('workflow.workflow ' , $ tags );
311
+ $ this ->assertSame ([['name ' => 'article ' ]], $ tags ['workflow.workflow ' ]);
312
+ $ this ->assertSame ('article ' , $ tags ['workflow ' ][0 ]['name ' ] ?? null );
313
+ $ this ->assertSame ('workflow ' , $ tags ['workflow ' ][0 ]['config ' ]['type ' ] ?? null );
309
314
310
315
$ this ->assertTrue ($ container ->hasDefinition ('workflow.article.definition ' ), 'Workflow definition is registered as a service ' );
311
316
@@ -336,7 +341,12 @@ public function testWorkflows()
336
341
$ this ->assertSame ('state_machine.abstract ' , $ container ->getDefinition ('state_machine.pull_request ' )->getParent ());
337
342
$ this ->assertTrue ($ container ->hasDefinition ('state_machine.pull_request.definition ' ), 'State machine definition is registered as a service ' );
338
343
339
- $ 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 ('state_machine ' , $ tags ['workflow ' ][0 ]['config ' ]['type ' ] ?? null );
340
350
341
351
$ stateMachineDefinition = $ container ->getDefinition ('state_machine.pull_request.definition ' );
342
352
0 commit comments