Total Complexity | 3 |
Total Lines | 34 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | class jsonParser_plugin_prosemirror_test extends DokuWikiTest |
||
12 | { |
||
13 | protected $pluginsEnabled = ['prosemirror', 'wrap']; |
||
14 | |||
15 | /** |
||
16 | * @dataProvider rendererProvider |
||
17 | * |
||
18 | * @param string $json |
||
19 | * @param string $expectedDokuWikiMarkup |
||
20 | * @param string $msg |
||
21 | */ |
||
22 | public function test_parser($json, $expectedDokuWikiMarkup, $msg) |
||
23 | { |
||
24 | $rootNode = SyntaxTreeBuilder::parseDataIntoTree(json_decode($json, true)); |
||
25 | $actualMarkup = $rootNode->toSyntax(); |
||
26 | $this->assertEquals(rtrim($expectedDokuWikiMarkup), rtrim($actualMarkup), $msg); |
||
27 | } |
||
28 | |||
29 | /** |
||
30 | * @return array |
||
31 | */ |
||
32 | public function rendererProvider() |
||
45 | } |
||
46 | } |
||
47 |