diff options
author | Igor Wiedler <igor@wiedler.ch> | 2011-01-16 20:25:06 +0100 |
---|---|---|
committer | Igor Wiedler <igor@wiedler.ch> | 2011-01-16 20:25:06 +0100 |
commit | e9c584af6aee4d8cec81ad1f96066860ea878644 (patch) | |
tree | 4f9b4ab59849c55c788d6d57c6aa11a898508d51 /tests/regex/censor_test.php | |
parent | 1359cf654714107f752d14a358d76ee310a9ff57 (diff) | |
parent | 2b37a4fe56f86430733fd5757f6c8a4907f51a3f (diff) | |
download | forums-e9c584af6aee4d8cec81ad1f96066860ea878644.tar forums-e9c584af6aee4d8cec81ad1f96066860ea878644.tar.gz forums-e9c584af6aee4d8cec81ad1f96066860ea878644.tar.bz2 forums-e9c584af6aee4d8cec81ad1f96066860ea878644.tar.xz forums-e9c584af6aee4d8cec81ad1f96066860ea878644.zip |
Merge branch 'ticket/bantu/9933' into develop-olympus
* ticket/bantu/9933:
[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.
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); } |