Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / file / src / Tests / FileFieldWidgetTest.php
index 8017ebf1b25dd88fef5bc93f19700778184de76b..3102bd744d79252cbc07f42ad97d89ca1a4e2247 100644 (file)
@@ -4,7 +4,6 @@ namespace Drupal\file\Tests;
 
 use Drupal\comment\Entity\Comment;
 use Drupal\comment\Tests\CommentTestTrait;
-use Drupal\Component\Utility\Unicode;
 use Drupal\Core\Url;
 use Drupal\field\Entity\FieldConfig;
 use Drupal\field\Entity\FieldStorageConfig;
@@ -270,7 +269,7 @@ class FileFieldWidgetTest extends FileFieldTestBase {
     // Try to upload exactly the allowed number of files on revision. Create an
     // empty node first, to fill it in its first revision.
     $node = $this->drupalCreateNode([
-      'type' => $type_name
+      'type' => $type_name,
     ]);
     $this->uploadNodeFile($test_file, $field_name, $node->id(), 1);
     $node_storage->resetCache([$nid]);
@@ -461,7 +460,7 @@ class FileFieldWidgetTest extends FileFieldTestBase {
    * Tests file widget element.
    */
   public function testWidgetElement() {
-    $field_name = Unicode::strtolower($this->randomMachineName());
+    $field_name = mb_strtolower($this->randomMachineName());
     $html_name = str_replace('_', '-', $field_name);
     $this->createFileField($field_name, 'node', 'article', ['cardinality' => FieldStorageConfig::CARDINALITY_UNLIMITED]);
     $file = $this->getTestFile('text');