Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / search / tests / src / Functional / SearchTokenizerTest.php
index 218ec185b1d35d0315f449f44ff0abfe53b388ff..2e608fc0563309fac4b174d4d88e4aa3383fb153 100644 (file)
@@ -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 @@ class SearchTokenizerTest extends SearchTestBase {
     // 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 @@ class SearchTokenizerTest extends SearchTestBase {
   /**
    * 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) {