Security update for Core, with self-updated composer
[yaffs-website] / web / core / modules / field / tests / src / Functional / EntityReference / EntityReferenceIntegrationTest.php
index 56484705e1bfcbe926e5215c31e55a284e3d949f..940ad376f68a16a3deb49914218ee8a9195e35e0 100644 (file)
@@ -3,11 +3,11 @@
 namespace Drupal\Tests\field\Functional\EntityReference;
 
 use Drupal\Component\Utility\SafeMarkup;
-use Drupal\config\Tests\AssertConfigEntityImportTrait;
 use Drupal\entity_test\Entity\EntityTest;
 use Drupal\field\Entity\FieldConfig;
 use Drupal\Tests\BrowserTestBase;
 use Drupal\field\Tests\EntityReference\EntityReferenceTestTrait;
+use Drupal\Tests\config\Traits\AssertConfigEntityImportTrait;
 
 /**
  * Tests various Entity reference UI components.
@@ -197,9 +197,10 @@ class EntityReferenceIntegrationTest extends BrowserTestBase {
    *   An array of entity objects.
    */
   protected function getTestEntities() {
-    $config_entity_1 = entity_create('config_test', ['id' => $this->randomMachineName(), 'label' => $this->randomMachineName()]);
+    $storage = \Drupal::entityTypeManager()->getStorage('config_test');
+    $config_entity_1 = $storage->create(['id' => $this->randomMachineName(), 'label' => $this->randomMachineName()]);
     $config_entity_1->save();
-    $config_entity_2 = entity_create('config_test', ['id' => $this->randomMachineName(), 'label' => $this->randomMachineName()]);
+    $config_entity_2 = $storage->create(['id' => $this->randomMachineName(), 'label' => $this->randomMachineName()]);
     $config_entity_2->save();
 
     $content_entity_1 = EntityTest::create(['name' => $this->randomMachineName()]);