use Symfony\Component\Workflow\Transition;
class PlantUmlDumperTest extends TestCase
{ use WorkflowBuilderTrait;
/**
* @dataProvider provideWorkflowDefinitionWithoutMarking
*/
public function testDumpWorkflowWithoutMarking($definition,
$marking,
$expectedFileName,
$title) { $dumper =
new PlantUmlDumper(PlantUmlDumper::WORKFLOW_TRANSITION
);
$dump =
$dumper->
dump($definition,
$marking,
['title' =>
$title]);
// handle windows, and avoid to create more fixtures
$dump =
str_replace(\PHP_EOL, "\n",
$dump.\PHP_EOL
);
$file =
$this->
getFixturePath($expectedFileName, PlantUmlDumper::WORKFLOW_TRANSITION
);
$this->
assertStringEqualsFile($file,
$dump);
} public static function provideWorkflowDefinitionWithoutMarking(): \Generator
{ yield [self::
createSimpleWorkflowDefinition(), null, 'simple-workflow-nomarking', 'SimpleDiagram'
];
yield [self::
createComplexWorkflowDefinition(), null, 'complex-workflow-nomarking', 'ComplexDiagram'
];