1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-11 03:04:09 +02:00

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.
This commit is contained in:
Igor Wiedler
2011-01-16 20:28:06 +01:00
2 changed files with 23 additions and 21 deletions

View File

@@ -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);
}