diff options
Diffstat (limited to 'tests/regex/censor_test.php')
-rw-r--r-- | tests/regex/censor_test.php | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/tests/regex/censor_test.php b/tests/regex/censor_test.php index ae2d86e07e..fa9104e71d 100644 --- a/tests/regex/censor_test.php +++ b/tests/regex/censor_test.php @@ -7,7 +7,7 @@ * */ -require_once __DIR__ . '/../../phpBB/includes/functions.php'; +require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php'; class phpbb_regex_censor_test extends phpbb_test_case { @@ -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); } |