use WorkflowBuilderTrait;
public function testItWorks() { $definition =
$this->
createSimpleWorkflowDefinition();
$object =
new Subject();
$logger =
new Logger();
$ed =
new EventDispatcher();
$ed->
addSubscriber(new AuditTrailListener($logger));
$workflow =
new Workflow($definition,
new MethodMarkingStore(),
$ed);
$workflow->
apply($object, 't1'
);
$expected =
[ 'Leaving "a" for subject of class "Symfony\Component\Workflow\Tests\Subject" in workflow "unnamed".',
'Transition "t1" for subject of class "Symfony\Component\Workflow\Tests\Subject" in workflow "unnamed".',
'Entering "b" for subject of class "Symfony\Component\Workflow\Tests\Subject" in workflow "unnamed".',
];