From 7ce2d996a82b5a2f68560a4136c1f3938a1955d4 Mon Sep 17 00:00:00 2001 From: JoshyPHP Date: Wed, 24 Jun 2015 22:36:38 +0200 Subject: [ticket/10620] Added tests PHPBB3-10620 --- .../text_formatter/s9e/default_formatting_test.php | 5 ++++ tests/text_formatter/s9e/utils_test.php | 30 ++++++++++++++++++++++ 2 files changed, 35 insertions(+) (limited to 'tests/text_formatter/s9e') diff --git a/tests/text_formatter/s9e/default_formatting_test.php b/tests/text_formatter/s9e/default_formatting_test.php index 38604b49a0..ed75555b42 100644 --- a/tests/text_formatter/s9e/default_formatting_test.php +++ b/tests/text_formatter/s9e/default_formatting_test.php @@ -247,6 +247,11 @@ class phpbb_textformatter_s9e_default_formatting_test extends phpbb_test_case '[quote=Username profile_url=http://fake.example.org]...[/quote]', '
Username wrote:...
' ), + array( + // From phpbb_textformatter_s9e_utils_test::test_generate_quote() + '[quote=\'[quote="foo"]\']...[/quote]', + '
[quote="foo"] wrote:...
' + ), ); } } diff --git a/tests/text_formatter/s9e/utils_test.php b/tests/text_formatter/s9e/utils_test.php index f2b480facb..1c03783792 100644 --- a/tests/text_formatter/s9e/utils_test.php +++ b/tests/text_formatter/s9e/utils_test.php @@ -175,6 +175,36 @@ class phpbb_textformatter_s9e_utils_test extends phpbb_test_case ), '[quote=user post_id=123 url=http://example.org]...[/quote]', ), + array( + '...', + array('author' => ' '), + '[quote=" "]...[/quote]', + ), + array( + '...', + array('author' => 'foo bar'), + '[quote="foo bar"]...[/quote]', + ), + array( + '...', + array('author' => '\\'), + '[quote="\\\\"]...[/quote]', + ), + array( + '...', + array('author' => '[quote="foo"]'), + '[quote=\'[quote="foo"]\']...[/quote]', + ), + array( + '...', + array('author' => '""'), + '[quote=\'""\']...[/quote]', + ), + array( + '...', + array('author' => "''"), + '[quote="\'\'"]...[/quote]', + ), array( 'This is a long quote that is definitely going to exceed 80 characters', array(), -- cgit v1.2.1