Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / tests / Drupal / KernelTests / Core / Asset / AttachedAssetsTest.php
index 1e1c6fd8fa29b1a1be36d0bec1378d5a910e70e4..fff73c29862b791cefc9f3fba8b5ce942bcae946 100644 (file)
@@ -3,14 +3,13 @@
 namespace Drupal\KernelTests\Core\Asset;
 
 use Drupal\Component\Serialization\Json;
-use Drupal\Component\Utility\Unicode;
 use Drupal\Core\Asset\AttachedAssets;
 use Drupal\KernelTests\KernelTestBase;
 
 /**
  * Tests #attached assets: attached asset libraries and JavaScript settings.
  *
- * i.e. tests:
+ * I.e. tests:
  *
  * @code
  * $build['#attached']['library'] = …
@@ -205,7 +204,7 @@ class AttachedAssetsTest extends KernelTestBase {
     $end = strrpos($rendered_js, $endToken);
     // Convert to a string, as $renderer_js is a \Drupal\Core\Render\Markup
     // object.
-    $json  = Unicode::substr($rendered_js, $start, $end - $start + 1);
+    $json = mb_substr($rendered_js, $start, $end - $start + 1);
     $parsed_settings = Json::decode($json);
 
     // Test whether the settings for core/drupalSettings are available.