aboutsummaryrefslogtreecommitdiffstats
path: root/tests/text_formatter/s9e/factory_test.php
diff options
context:
space:
mode:
authorJoshyPHP <s9e.dev@gmail.com>2015-03-21 12:32:17 +0100
committerJoshyPHP <s9e.dev@gmail.com>2015-04-02 19:16:03 +0200
commit69dae16ba79a82714b3fa24955c5cbc6e372a388 (patch)
treeb5c9b679f9ef152bc8796b3c07c38b3a9eec9a3f /tests/text_formatter/s9e/factory_test.php
parent3cd5ca8de12f645f3c8664942f0328e18d5a2789 (diff)
downloadforums-69dae16ba79a82714b3fa24955c5cbc6e372a388.tar
forums-69dae16ba79a82714b3fa24955c5cbc6e372a388.tar.gz
forums-69dae16ba79a82714b3fa24955c5cbc6e372a388.tar.bz2
forums-69dae16ba79a82714b3fa24955c5cbc6e372a388.tar.xz
forums-69dae16ba79a82714b3fa24955c5cbc6e372a388.zip
[ticket/11768] Preserve comments in custom BBCodes
PHPBB3-11768
Diffstat (limited to 'tests/text_formatter/s9e/factory_test.php')
-rw-r--r--tests/text_formatter/s9e/factory_test.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/text_formatter/s9e/factory_test.php b/tests/text_formatter/s9e/factory_test.php
index 9f7551ef14..8382097544 100644
--- a/tests/text_formatter/s9e/factory_test.php
+++ b/tests/text_formatter/s9e/factory_test.php
@@ -179,6 +179,21 @@ class phpbb_textformatter_s9e_factory_test extends phpbb_database_test_case
}
/**
+ * @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
*/
public function test_unsafe_bbcode()