X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fsystem%2Ftests%2Fsrc%2FKernel%2FEntity%2FEntityReferenceSelectionReferenceableTest.php;fp=web%2Fcore%2Fmodules%2Fsystem%2Ftests%2Fsrc%2FKernel%2FEntity%2FEntityReferenceSelectionReferenceableTest.php;h=15a53decf8caf00a654ff00c24d4ff3b8d85b85b;hp=f7fa5d87be46cfb6d6b87b018db9cb0e967c7caf;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hpb=74df008bdbb3a11eeea356744f39b802369bda3c diff --git a/web/core/modules/system/tests/src/Kernel/Entity/EntityReferenceSelectionReferenceableTest.php b/web/core/modules/system/tests/src/Kernel/Entity/EntityReferenceSelectionReferenceableTest.php index f7fa5d87b..15a53decf 100644 --- a/web/core/modules/system/tests/src/Kernel/Entity/EntityReferenceSelectionReferenceableTest.php +++ b/web/core/modules/system/tests/src/Kernel/Entity/EntityReferenceSelectionReferenceableTest.php @@ -3,11 +3,10 @@ namespace Drupal\Tests\system\Kernel\Entity; use Drupal\Component\Utility\Html; -use Drupal\Component\Utility\Unicode; -use Drupal\field\Tests\EntityReference\EntityReferenceTestTrait; use Drupal\field\Entity\FieldConfig; use Drupal\node\Entity\NodeType; use Drupal\KernelTests\KernelTestBase; +use Drupal\Tests\field\Traits\EntityReferenceTestTrait; /** * Tests entity reference selection plugins. @@ -35,7 +34,7 @@ class EntityReferenceSelectionReferenceableTest extends KernelTestBase { /** * The selection handler. * - * @var \Drupal\Core\Entity\EntityReferenceSelection\SelectionInterface. + * @var \Drupal\Core\Entity\EntityReferenceSelection\SelectionInterface */ protected $selectionHandler; @@ -58,24 +57,24 @@ class EntityReferenceSelectionReferenceableTest extends KernelTestBase { // Create a new node-type. NodeType::create([ - 'type' => $node_type = Unicode::strtolower($this->randomMachineName()), + 'type' => $node_type = mb_strtolower($this->randomMachineName()), 'name' => $this->randomString(), ])->save(); // Create an entity reference field targeting 'entity_test_no_label' // entities. - $field_name = Unicode::strtolower($this->randomMachineName()); + $field_name = mb_strtolower($this->randomMachineName()); $this->createEntityReferenceField('node', $node_type, $field_name, $this->randomString(), 'entity_test_no_label'); $field_config = FieldConfig::loadByName('node', $node_type, $field_name); $this->selectionHandler = $this->container->get('plugin.manager.entity_reference_selection')->getSelectionHandler($field_config); // Generate a bundle name to be used with 'entity_test_no_label'. - $this->bundle = Unicode::strtolower($this->randomMachineName()); + $this->bundle = mb_strtolower($this->randomMachineName()); // Create 6 entities to be referenced by the field. foreach (static::$labels as $name) { $storage->create([ - 'id' => Unicode::strtolower($this->randomMachineName()), + 'id' => mb_strtolower($this->randomMachineName()), 'name' => $name, 'type' => $this->bundle, ])->save();