// +---------+ +----------+ |
$places =
['place a', 'place b'
];
$transitions =
[];
$transition =
new Transition('t 1', 'place a', 'place b'
);
$transitions[] =
$transition;
$placesMetadata =
[];
$placesMetadata['place a'
] =
[ 'description' => "My custom\nplace description",
];
$inMemoryMetadataStore =
new InMemoryMetadataStore([],
$placesMetadata);
$definition =
new Definition($places,
$transitions, null,
$inMemoryMetadataStore);
$dump =
$dumper->
dump($definition, null,
['title' => 'SimpleDiagram'
]);
$dump =
str_replace(\PHP_EOL, "\n",
$dump.\PHP_EOL
);
$file =
$this->
getFixturePath('simple-workflow-with-spaces', PlantUmlDumper::WORKFLOW_TRANSITION
);
$this->
assertStringEqualsFile($file,
$dump);
} private function getFixturePath($name,
$transitionType): string
{ return __DIR__.'/../fixtures/puml/'.
$transitionType.'/'.
$name.'.puml';
}