getFilters(); $this->assertExtensionExists('markdown', [$extension, 'render'], $filters); $this->assertExtensionExists('md', [$extension, 'render'], $filters); } /** * @covers \Engelsystem\Renderer\Twig\Extensions\Markdown::__construct * @covers \Engelsystem\Renderer\Twig\Extensions\Markdown::render */ public function testRender() { $extension = new Markdown(new Parsedown()); $this->assertEquals( '
<i>Lorem</i> "Ipsum"
', $extension->render('Lorem *"Ipsum"*'), ); } /** * @covers \Engelsystem\Renderer\Twig\Extensions\Markdown::render */ public function testRenderHtml() { $renderer = new Parsedown(); $extension = new Markdown($renderer); $this->assertEquals( 'Lorem "Ipsum"
', $extension->render('Lorem *"Ipsum"*', false), ); } }