namespace Drupal\Tests\search\Functional;
-use Drupal\Component\Utility\Unicode;
+use Drupal\Tests\BrowserTestBase;
/**
* Tests that CJK tokenizer works as intended.
*
* @group search
*/
-class SearchTokenizerTest extends SearchTestBase {
+class SearchTokenizerTest extends BrowserTestBase {
+
+ /**
+ * {@inheritdoc}
+ */
+ protected static $modules = ['search'];
/**
* Verifies that strings of CJK characters are tokenized.
// Merge into a string and tokenize.
$string = implode('', $chars);
$out = trim(search_simplify($string));
- $expected = Unicode::strtolower(implode(' ', $chars));
+ $expected = mb_strtolower(implode(' ', $chars));
// Verify that the output matches what we expect.
$this->assertEqual($out, $expected, 'CJK tokenizer worked on all supplied CJK characters');
/**
* Like PHP chr() function, but for unicode characters.
*
- * chr() only works for ASCII characters up to character 255. This function
- * converts a number to the corresponding unicode character. Adapted from
- * functions supplied in comments on several functions on php.net.
+ * Function chr() only works for ASCII characters up to character 255. This
+ * function converts a number to the corresponding unicode character. Adapted
+ * from functions supplied in comments on several functions on php.net.
*/
public function code2utf($num) {
if ($num < 128) {