getFixturePath example

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'];
        $marking = new Marking(['b' => 1]);
        yield [self::createSimpleWorkflowDefinition()$marking, 'simple-workflow-marking', 'SimpleDiagram'];
        $marking = new Marking(['c' => 1, 'e' => 1]);
        yield [self::createComplexWorkflowDefinition()$marking, 'complex-workflow-marking', 'ComplexDiagram'];
    }
Home | Imprint | This part of the site doesn't use cookies.