55
55
use Symfony \Component \Validator \Mapping \Loader \PropertyInfoLoader ;
56
56
use Symfony \Component \Validator \Util \LegacyTranslatorProxy ;
57
57
use Symfony \Component \Workflow ;
58
+ use Symfony \Component \Workflow \Metadata \InMemoryMetadataStore ;
58
59
use Symfony \Contracts \Translation \TranslatorInterface ;
59
60
60
61
abstract class FrameworkExtensionTest extends TestCase
@@ -242,6 +243,12 @@ public function testWorkflows()
242
243
);
243
244
$ this ->assertCount (4 , $ workflowDefinition ->getArgument (1 ));
244
245
$ this ->assertSame (['draft ' ], $ workflowDefinition ->getArgument (2 ));
246
+ $ metadataStoreDefinition = $ workflowDefinition ->getArgument (3 );
247
+ $ this ->assertSame (InMemoryMetadataStore::class, $ metadataStoreDefinition ->getClass ());
248
+ $ this ->assertSame ([
249
+ 'title ' => 'article workflow ' ,
250
+ 'description ' => 'workflow for articles ' ,
251
+ ], $ metadataStoreDefinition ->getArgument (0 ));
245
252
246
253
$ this ->assertTrue ($ container ->hasDefinition ('state_machine.pull_request ' ), 'State machine is registered as a service ' );
247
254
$ this ->assertSame ('state_machine.abstract ' , $ container ->getDefinition ('state_machine.pull_request ' )->getParent ());
@@ -266,7 +273,7 @@ public function testWorkflows()
266
273
267
274
$ metadataStoreDefinition = $ stateMachineDefinition ->getArgument (3 );
268
275
$ this ->assertInstanceOf (Definition::class, $ metadataStoreDefinition );
269
- $ this ->assertSame (Workflow \ Metadata \ InMemoryMetadataStore::class, $ metadataStoreDefinition ->getClass ());
276
+ $ this ->assertSame (InMemoryMetadataStore::class, $ metadataStoreDefinition ->getClass ());
270
277
271
278
$ workflowMetadata = $ metadataStoreDefinition ->getArgument (0 );
272
279
$ this ->assertSame (['title ' => 'workflow title ' ], $ workflowMetadata );
0 commit comments