aboutsummaryrefslogtreecommitdiffstats
path: root/tests/text_formatter
diff options
context:
space:
mode:
authorJoshyPHP <s9e.dev@gmail.com>2015-06-27 12:33:44 +0200
committerJoshyPHP <s9e.dev@gmail.com>2015-06-27 12:33:44 +0200
commit353b3b4cfd7133ea0cef4a7fdb34d0451b16a0dd (patch)
treeda03bdea38ddc1b5475d3cbe04adb81cf5dc43a0 /tests/text_formatter
parent9e117a9eeb1958c7a8155c2e4912d4e3537f3dee (diff)
downloadforums-353b3b4cfd7133ea0cef4a7fdb34d0451b16a0dd.tar
forums-353b3b4cfd7133ea0cef4a7fdb34d0451b16a0dd.tar.gz
forums-353b3b4cfd7133ea0cef4a7fdb34d0451b16a0dd.tar.bz2
forums-353b3b4cfd7133ea0cef4a7fdb34d0451b16a0dd.tar.xz
forums-353b3b4cfd7133ea0cef4a7fdb34d0451b16a0dd.zip
[ticket/13970] Save the value of the optional [code] parameter
PHPBB3-13970
Diffstat (limited to 'tests/text_formatter')
-rw-r--r--tests/text_formatter/s9e/default_formatting_test.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/text_formatter/s9e/default_formatting_test.php b/tests/text_formatter/s9e/default_formatting_test.php
index 67921d5b1e..4829e9bbc8 100644
--- a/tests/text_formatter/s9e/default_formatting_test.php
+++ b/tests/text_formatter/s9e/default_formatting_test.php
@@ -15,6 +15,17 @@ require_once __DIR__ . '/../../../phpBB/includes/functions_content.php';
class phpbb_textformatter_s9e_default_formatting_test extends phpbb_test_case
{
+ public function test_bbcode_code_lang_is_saved()
+ {
+ $container = $this->get_test_case_helpers()->set_s9e_services();
+ $parser = $container->get('text_formatter.parser');
+
+ $original = '[code]...[/code][code=php]...[/code]';
+ $expected = '<r><CODE><s>[code]</s>...<e>[/code]</e></CODE><CODE lang="php"><s>[code=php]</s>...<e>[/code]</e></CODE></r>';
+
+ $this->assertXmlStringEqualsXmlString($expected, $parser->parse($original));
+ }
+
/**
* @dataProvider get_default_formatting_tests
*/