Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / field_ui / tests / src / Kernel / EntityDisplayTest.php
index 2d02e44a5585fbf3841e9722f9258f62e11b9be3..5ee2d406d28ecff0a3ef822cfd93d16c880ce833 100644 (file)
@@ -3,7 +3,6 @@
 namespace Drupal\Tests\field_ui\Kernel;
 
 use Drupal\Component\Render\FormattableMarkup;
-use Drupal\Component\Utility\Unicode;
 use Drupal\Core\Cache\Cache;
 use Drupal\Core\Database\Database;
 use Drupal\Core\Entity\Display\EntityDisplayInterface;
@@ -87,7 +86,7 @@ class EntityDisplayTest extends KernelTestBase {
         'link_to_entity' => FALSE,
       ],
       'third_party_settings' => [],
-      'region' => 'content'
+      'region' => 'content',
     ];
     $this->assertEqual($display->getComponents(), $expected);
 
@@ -166,7 +165,15 @@ class EntityDisplayTest extends KernelTestBase {
 
     // Check that the default visibility taken into account for extra fields
     // unknown in the display.
-    $this->assertEqual($display->getComponent('display_extra_field'), ['weight' => 5, 'region' => 'content']);
+    $this->assertEqual(
+      $display->getComponent('display_extra_field'),
+      [
+        'weight' => 5,
+        'region' => 'content',
+        'settings' => [],
+        'third_party_settings' => [],
+      ]
+    );
     $this->assertNull($display->getComponent('display_extra_field_hidden'));
 
     // Check that setting explicit options overrides the defaults.
@@ -214,7 +221,7 @@ class EntityDisplayTest extends KernelTestBase {
     $field_storage = FieldStorageConfig::create([
       'field_name' => $field_name,
       'entity_type' => 'entity_test',
-      'type' => 'test_field'
+      'type' => 'test_field',
     ]);
     $field_storage->save();
     $field = FieldConfig::create([
@@ -360,7 +367,7 @@ class EntityDisplayTest extends KernelTestBase {
     $field_storage = FieldStorageConfig::create([
       'field_name' => $field_name,
       'entity_type' => 'entity_test',
-      'type' => 'test_field'
+      'type' => 'test_field',
     ]);
     $field_storage->save();
     $field = FieldConfig::create([
@@ -409,7 +416,7 @@ class EntityDisplayTest extends KernelTestBase {
     $field_storage = FieldStorageConfig::create([
       'field_name' => $field_name,
       'entity_type' => 'entity_test',
-      'type' => 'text'
+      'type' => 'text',
     ]);
     $field_storage->save();
     $field = FieldConfig::create([
@@ -515,14 +522,14 @@ class EntityDisplayTest extends KernelTestBase {
     // Create two arbitrary user roles.
     for ($i = 0; $i < 2; $i++) {
       $roles[$i] = Role::create([
-        'id' => Unicode::strtolower($this->randomMachineName()),
+        'id' => mb_strtolower($this->randomMachineName()),
         'label' => $this->randomString(),
       ]);
       $roles[$i]->save();
     }
 
     // Create a field of type 'test_field' attached to 'entity_test'.
-    $field_name = Unicode::strtolower($this->randomMachineName());
+    $field_name = mb_strtolower($this->randomMachineName());
     FieldStorageConfig::create([
       'field_name' => $field_name,
       'entity_type' => 'entity_test',