bob: yo what up\nbob->alice: not much\n@enduml","https://www.plantuml.com/plantuml/");
$this->assertEquals(
'https://www.plantuml.com/plantuml/svg/SoWkIImgAStDuKhCoKnELT2rKqZAJx9IgCnNACz8B54eBU02ydNjmB9M2ddv9GgvfSaPN0wfUIb0NG00',
$diagramObject->getSVGDiagramUrl()
);
}
public function testPngUrlGeneratedCorrectly()
{
$diagramObject = new PlantUmlDiagram("@startuml\nalice -> bob: yo what up\nbob->alice: not much\n@enduml","https://www.plantuml.com/plantuml/");
$this->assertEquals(
'https://www.plantuml.com/plantuml/png/SoWkIImgAStDuKhCoKnELT2rKqZAJx9IgCnNACz8B54eBU02ydNjmB9M2ddv9GgvfSaPN0wfUIb0NG00',
$diagramObject->getPNGDiagramUrl()
);
}
public function testTxtUrlGeneratedCorrectly()
{
$diagramObject = new PlantUmlDiagram("@startuml\nalice -> bob: yo what up\nbob->alice: not much\n@enduml","https://www.plantuml.com/plantuml/");
$this->assertEquals(
'https://www.plantuml.com/plantuml/txt/SoWkIImgAStDuKhCoKnELT2rKqZAJx9IgCnNACz8B54eBU02ydNjmB9M2ddv9GgvfSaPN0wfUIb0NG00',
$diagramObject->getTXTDiagramUrl()
);
}
public function testForeignCharacterGeneratedCorrectly()
{
$diagramObject = new PlantUmlDiagram("@startuml\nThomas -> Petra : bitte aus Spaß die Türe öffnen\n@enduml","https://www.plantuml.com/plantuml/");
$this->assertEquals(
'https://www.plantuml.com/plantuml/png/SoWkIImgAStDuGh9oCzDB5RGjLC8I2qfIbImKaZAB2b9LKWiBLO8BaWyF5yX9JDL8UJmdg9KXSFRqjBoKlEu75BpKe1w0G00',
$diagramObject->getPNGDiagramUrl()
);
}
public function testGetMarkup()
{
$diagramObject = new PlantUmlDiagram("@startuml\nalice -> bob: yo what up\nbob->alice: not much\n@enduml","https://www.plantuml.com/plantuml/");
$this->assertEquals(
'@startuml
alice -> bob: yo what up
bob->alice: not much
@enduml',
$diagramObject->getMarkup()
);
}
}