Mercurial > hg > cmmr2012-drupal-site
diff core/modules/search/tests/src/Functional/SearchTokenizerTest.php @ 4:a9cd425dd02b
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:11:55 +0000 |
parents | c75dbcec494b |
children |
line wrap: on
line diff
--- a/core/modules/search/tests/src/Functional/SearchTokenizerTest.php Thu Feb 28 11:14:44 2019 +0000 +++ b/core/modules/search/tests/src/Functional/SearchTokenizerTest.php Thu Feb 28 13:11:55 2019 +0000 @@ -2,14 +2,19 @@ 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. @@ -95,7 +100,7 @@ // 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'); @@ -125,9 +130,9 @@ /** * 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) {