X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Ffield%2Ftests%2Fsrc%2FFunctional%2FEntityReference%2FEntityReferenceIntegrationTest.php;fp=web%2Fcore%2Fmodules%2Ffield%2Ftests%2Fsrc%2FFunctional%2FEntityReference%2FEntityReferenceIntegrationTest.php;h=15326b9952708cc0cc813e5442546345d6414efe;hp=940ad376f68a16a3deb49914218ee8a9195e35e0;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hpb=74df008bdbb3a11eeea356744f39b802369bda3c diff --git a/web/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceIntegrationTest.php b/web/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceIntegrationTest.php index 940ad376f..15326b995 100644 --- a/web/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceIntegrationTest.php +++ b/web/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceIntegrationTest.php @@ -2,12 +2,12 @@ namespace Drupal\Tests\field\Functional\EntityReference; -use Drupal\Component\Utility\SafeMarkup; +use Drupal\Component\Render\FormattableMarkup; 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; +use Drupal\Tests\field\Traits\EntityReferenceTestTrait; /** * Tests various Entity reference UI components. @@ -149,7 +149,7 @@ class EntityReferenceIntegrationTest extends BrowserTestBase { // Ensure the configuration has the expected dependency on the entity that // is being used a default value. $field = FieldConfig::loadByName($this->entityType, $this->bundle, $this->fieldName); - $this->assertTrue(in_array($referenced_entities[0]->getConfigDependencyName(), $field->getDependencies()[$key]), SafeMarkup::format('Expected @type dependency @name found', ['@type' => $key, '@name' => $referenced_entities[0]->getConfigDependencyName()])); + $this->assertTrue(in_array($referenced_entities[0]->getConfigDependencyName(), $field->getDependencies()[$key]), new FormattableMarkup('Expected @type dependency @name found', ['@type' => $key, '@name' => $referenced_entities[0]->getConfigDependencyName()])); // Ensure that the field can be imported without change even after the // default value deleted. $referenced_entities[0]->delete(); @@ -163,7 +163,7 @@ class EntityReferenceIntegrationTest extends BrowserTestBase { $field = FieldConfig::loadByName($this->entityType, $this->bundle, $this->fieldName); $field->save(); $dependencies = $field->getDependencies(); - $this->assertFalse(isset($dependencies[$key]) && in_array($referenced_entities[0]->getConfigDependencyName(), $dependencies[$key]), SafeMarkup::format('@type dependency @name does not exist.', ['@type' => $key, '@name' => $referenced_entities[0]->getConfigDependencyName()])); + $this->assertFalse(isset($dependencies[$key]) && in_array($referenced_entities[0]->getConfigDependencyName(), $dependencies[$key]), new FormattableMarkup('@type dependency @name does not exist.', ['@type' => $key, '@name' => $referenced_entities[0]->getConfigDependencyName()])); } }