X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=web%2Fcore%2Fmodules%2Ffield%2Ftests%2Fsrc%2FKernel%2FFieldTypePluginManagerTest.php;h=c40229fe7a9a0fee415f88455b9435449a4cae26;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hp=32b2964809f5461e5e7eb30b00cf93623436e813;hpb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;p=yaffs-website diff --git a/web/core/modules/field/tests/src/Kernel/FieldTypePluginManagerTest.php b/web/core/modules/field/tests/src/Kernel/FieldTypePluginManagerTest.php index 32b296480..c40229fe7 100644 --- a/web/core/modules/field/tests/src/Kernel/FieldTypePluginManagerTest.php +++ b/web/core/modules/field/tests/src/Kernel/FieldTypePluginManagerTest.php @@ -2,7 +2,7 @@ namespace Drupal\Tests\field\Kernel; -use Drupal\Component\Utility\SafeMarkup; +use Drupal\Component\Render\FormattableMarkup; use Drupal\Core\Extension\ExtensionDiscovery; use Drupal\Core\Field\BaseFieldDefinition; use Drupal\entity_test\Entity\EntityTest; @@ -48,8 +48,8 @@ class FieldTypePluginManagerTest extends FieldKernelTestBase { $instance = $field_type_manager->createInstance($type, $configuration); - $this->assertTrue($instance instanceof $class, SafeMarkup::format('Created a @class instance', ['@class' => $class])); - $this->assertEqual($field_name, $instance->getName(), SafeMarkup::format('Instance name is @name', ['@name' => $field_name])); + $this->assertTrue($instance instanceof $class, new FormattableMarkup('Created a @class instance', ['@class' => $class])); + $this->assertEqual($field_name, $instance->getName(), new FormattableMarkup('Instance name is @name', ['@name' => $field_name])); } } @@ -79,8 +79,8 @@ class FieldTypePluginManagerTest extends FieldKernelTestBase { $instance = $field_type_manager->createInstance($type, $configuration); - $this->assertTrue($instance instanceof $class, SafeMarkup::format('Created a @class instance', ['@class' => $class])); - $this->assertEqual($field_name, $instance->getName(), SafeMarkup::format('Instance name is @name', ['@name' => $field_name])); + $this->assertTrue($instance instanceof $class, new FormattableMarkup('Created a @class instance', ['@class' => $class])); + $this->assertEqual($field_name, $instance->getName(), new FormattableMarkup('Instance name is @name', ['@name' => $field_name])); $this->assertEqual($instance->getFieldDefinition()->getLabel(), 'Jenny', 'Instance label is Jenny'); $this->assertEqual($instance->getFieldDefinition()->getDefaultValue($entity), [['value' => 8675309]], 'Instance default_value is 8675309'); } @@ -112,7 +112,7 @@ class FieldTypePluginManagerTest extends FieldKernelTestBase { * Enable all core modules. */ protected function enableAllCoreModules() { - $listing = new ExtensionDiscovery(\Drupal::root()); + $listing = new ExtensionDiscovery($this->root); $module_list = $listing->scan('module', FALSE); /** @var \Drupal\Core\Extension\ModuleHandlerInterface $module_handler */ $module_handler = $this->container->get('module_handler');