diff options
author | Nicofuma <github@nicofuma.fr> | 2015-05-20 00:38:49 +0200 |
---|---|---|
committer | Nicofuma <github@nicofuma.fr> | 2015-05-20 00:38:49 +0200 |
commit | c5493c2bb8e56e59cb3177d62a48a61fadf95303 (patch) | |
tree | b6ecc2d6e5f1ae51dde98b5f145cb3cac72c0cf5 /tests/text_formatter/s9e | |
parent | fda5a83b6daa66d7080c8de04cfedc15279a1204 (diff) | |
parent | f7ad2c2b32b309edba006a8d4b58727b50642ea2 (diff) | |
download | forums-c5493c2bb8e56e59cb3177d62a48a61fadf95303.tar forums-c5493c2bb8e56e59cb3177d62a48a61fadf95303.tar.gz forums-c5493c2bb8e56e59cb3177d62a48a61fadf95303.tar.bz2 forums-c5493c2bb8e56e59cb3177d62a48a61fadf95303.tar.xz forums-c5493c2bb8e56e59cb3177d62a48a61fadf95303.zip |
Merge pull request #3586 from s9e/ticket/13680
[ticket/13680] Updated quote notifications
Diffstat (limited to 'tests/text_formatter/s9e')
-rw-r--r-- | tests/text_formatter/s9e/utils_test.php | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/text_formatter/s9e/utils_test.php b/tests/text_formatter/s9e/utils_test.php index 69f8682cac..b1b937709c 100644 --- a/tests/text_formatter/s9e/utils_test.php +++ b/tests/text_formatter/s9e/utils_test.php @@ -75,6 +75,40 @@ class phpbb_textformatter_s9e_utils_test extends phpbb_test_case } /** + * @dataProvider get_outermost_quote_authors_tests + */ + public function test_get_outermost_quote_authors($original, $expected) + { + $container = $this->get_test_case_helpers()->set_s9e_services(); + $utils = $container->get('text_formatter.utils'); + $parser = $container->get('text_formatter.parser'); + + $this->assertSame($expected, $utils->get_outermost_quote_authors($parser->parse($original))); + } + + public function get_outermost_quote_authors_tests() + { + return array( + array( + 'No quotes here', + array() + ), + array( + '[quote="foo"]..[/quote] [quote]..[/quote]', + array('foo') + ), + array( + '[quote="foo"]..[/quote] [quote="bar"]..[/quote]', + array('foo', 'bar') + ), + array( + '[quote="foo"].[quote="baz"]..[/quote].[/quote] [quote="bar"]..[/quote]', + array('foo', 'bar') + ), + ); + } + + /** * @dataProvider get_remove_bbcode_tests */ public function test_remove_bbcode($original, $name, $depth, $expected) |