diff options
author | Igor Wiedler <igor@wiedler.ch> | 2011-01-16 20:28:06 +0100 |
---|---|---|
committer | Igor Wiedler <igor@wiedler.ch> | 2011-01-16 20:37:39 +0100 |
commit | 656f18d3af1168b15648e77005345698c3a507b5 (patch) | |
tree | fa63c865a72a3570c1ad04fb1aa85f03a88e73a3 /tests/regex/censor_test.php | |
parent | 78df30f7b76bf3fb0852c70b4e90e1acddc78b05 (diff) | |
parent | e9c584af6aee4d8cec81ad1f96066860ea878644 (diff) | |
download | forums-656f18d3af1168b15648e77005345698c3a507b5.tar forums-656f18d3af1168b15648e77005345698c3a507b5.tar.gz forums-656f18d3af1168b15648e77005345698c3a507b5.tar.bz2 forums-656f18d3af1168b15648e77005345698c3a507b5.tar.xz forums-656f18d3af1168b15648e77005345698c3a507b5.zip |
Merge branch 'develop-olympus' into develop
* develop-olympus:
[ticket/9933] Remove empty word check.
[ticket/9933] Add $use_unicode parameter to get_censor_preg_expression().
[ticket/9933] Adjust word censor regex for non-unicode mode.
Conflicts:
phpBB/includes/functions.php
Also remove static $unicode_support.
Diffstat (limited to 'tests/regex/censor_test.php')
-rw-r--r-- | tests/regex/censor_test.php | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/tests/regex/censor_test.php b/tests/regex/censor_test.php index ae2d86e07e..93c761c8d0 100644 --- a/tests/regex/censor_test.php +++ b/tests/regex/censor_test.php @@ -31,9 +31,19 @@ class phpbb_regex_censor_test extends phpbb_test_case /** * @dataProvider censor_test_data */ - public function test_censor($pattern, $subject) + public function test_censor_unicode($pattern, $subject) { - $regex = get_censor_preg_expression($pattern); + $regex = get_censor_preg_expression($pattern, true); + + $this->assertRegExp($regex, $subject); + } + + /** + * @dataProvider censor_test_data + */ + public function test_censor_no_unicode($pattern, $subject) + { + $regex = get_censor_preg_expression($pattern, false); $this->assertRegExp($regex, $subject); } |