1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

[ticket/11768] Preserve comments in custom BBCodes

PHPBB3-11768
This commit is contained in:
JoshyPHP
2015-03-21 12:32:17 +01:00
parent 3cd5ca8de1
commit 69dae16ba7
3 changed files with 47 additions and 0 deletions

View File

@@ -178,6 +178,21 @@ class phpbb_textformatter_s9e_factory_test extends phpbb_database_test_case
$this->assertSame($expected, $renderer->render($parser->parse($original)));
}
/**
* @testdox Preserves comments in custom BBCodes
*/
public function test_preserve_comments()
{
$fixture = __DIR__ . '/fixtures/preserve_comments.xml';
$container = $this->get_test_case_helpers()->set_s9e_services(null, $fixture);
$parser = $container->get('text_formatter.parser');
$renderer = $container->get('text_formatter.renderer');
$original = '[X]';
$expected = '<!-- comment -->';
$this->assertSame($expected, $renderer->render($parser->parse($original)));
}
/**
* @testdox Accepts unsafe custom BBCodes
*/