osm?lat=50.234&long=13.123}}',
[
'type' => 'osm',
'lat' => '50.234',
'long' => '13.123',
],
'simple example'
],
];
}
/**
* @dataProvider parseMatchTestDataProvider
*
* @param $input
* @param $expectedOutput
* @param $msg
*/
public function testParseMatch($input, $expectedOutput, $msg) {
// arrange
/** @var syntax_plugin_simplemap $syntax */
$syntax = plugin_load('syntax', 'simplemap');
// act
$actualOutput = $syntax->handle($input, 5, 1, new Doku_Handler());
// assert
self::assertEquals($expectedOutput, $actualOutput, $msg);
}
public function testRendererXHTML() {
/** @var syntax_plugin_simplemap $syntax */
$syntax = plugin_load('syntax', 'simplemap');
$testData = [
'type' => 'osm',
'lat' => '50.234',
'long' => '13.123',
];
$mockRenderer = new Doku_Renderer();
$actualStatus = $syntax->render('xhtml', $mockRenderer, $testData);
self::assertTrue($actualStatus);
$expectedHTML = '
View Larger Map';
self::assertSame($expectedHTML, $mockRenderer->doc);
}
public function testRendererMeta() {
/** @var syntax_plugin_simplemap $syntax */
$syntax = plugin_load('syntax', 'simplemap');
$testData = [
'type' => 'osm',
'lat' => '50.234',
'long' => '13.123',
];
$mockRenderer = new Doku_Renderer();
$actualStatus = $syntax->render('meta', $mockRenderer, $testData);
self::assertFalse($actualStatus);
self::assertSame('', $mockRenderer->doc);
}
}