Skip to content

Commit

Permalink
100% coverage :)
Browse files Browse the repository at this point in the history
  • Loading branch information
Denis Smetannikov committed Dec 12, 2019
1 parent 493bea0 commit 45da888
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 38 deletions.
13 changes: 0 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,6 @@ php:
- 7.3
- 7.4

matrix:
fast_finish: true
allow_failures:
- php: 7.4
include:
- php: 7.3
env: XDEBUG_OFF="yes"
- php: 7.4
env: XDEBUG_OFF="yes"

before_script:
- if [[ $XDEBUG_OFF = yes ]]; then phpenv config-rm xdebug.ini; fi;

script:
- make
- make test-all
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ $subGraph2
->addLink(new Link($alone, $nodeC));

echo $graph; // Get result as string (or $graph->__toString())
$htmlCode = $graph->renderHtml(true, '8.4.3'); // Get result as HTML code for debugging
$htmlCode = $graph->renderHtml([
'debug' => true,
'version' => '8.4.3',
'title' => 'Example'
]); // Get result as HTML code for debugging
```

### Result
Expand Down
24 changes: 0 additions & 24 deletions src/Printer.php

This file was deleted.

7 changes: 7 additions & 0 deletions tests/FlowchartTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,13 @@ public function testLinkRendering()
isSame('A-. "This is the text" .-> B;', (string)$link->setStyle(Link::DOTTED));
}

public function testNotFoundNode()
{
$this->expectException(\JBZoo\MermaidPHP\Exception::class);
$graph = new Graph();
$graph->getNode('undefined');
}

public function testSimpleGraph()
{
$graph = new Graph(['abc_order' => false]);
Expand Down

0 comments on commit 45da888

Please sign in to comment.