X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Ftests%2FDrupal%2FKernelTests%2FCore%2FConfig%2FConfigImportRenameValidationTest.php;fp=web%2Fcore%2Ftests%2FDrupal%2FKernelTests%2FCore%2FConfig%2FConfigImportRenameValidationTest.php;h=f52b3956ab962d2a21dacf7fc0788aac8f39bae6;hp=9c1875c85d201ab6f2ba22ffcc2711d409ff3985;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hpb=74df008bdbb3a11eeea356744f39b802369bda3c diff --git a/web/core/tests/Drupal/KernelTests/Core/Config/ConfigImportRenameValidationTest.php b/web/core/tests/Drupal/KernelTests/Core/Config/ConfigImportRenameValidationTest.php index 9c1875c85..f52b3956a 100644 --- a/web/core/tests/Drupal/KernelTests/Core/Config/ConfigImportRenameValidationTest.php +++ b/web/core/tests/Drupal/KernelTests/Core/Config/ConfigImportRenameValidationTest.php @@ -2,8 +2,7 @@ namespace Drupal\KernelTests\Core\Config; -use Drupal\Component\Utility\SafeMarkup; -use Drupal\Component\Utility\Unicode; +use Drupal\Component\Render\FormattableMarkup; use Drupal\Component\Uuid\Php; use Drupal\Core\Config\ConfigImporter; use Drupal\Core\Config\ConfigImporterException; @@ -40,7 +39,7 @@ class ConfigImportRenameValidationTest extends KernelTestBase { $this->installEntitySchema('user'); $this->installEntitySchema('node'); - $this->installConfig(['field']); + $this->installConfig(['system', 'field']); // Set up the ConfigImporter object for testing. $storage_comparer = new StorageComparer( @@ -82,7 +81,7 @@ class ConfigImportRenameValidationTest extends KernelTestBase { // Create a content type with a matching UUID in the active storage. $content_type = NodeType::create([ - 'type' => Unicode::strtolower($this->randomMachineName(16)), + 'type' => mb_strtolower($this->randomMachineName(16)), 'name' => $this->randomMachineName(), 'uuid' => $uuid, ]); @@ -106,7 +105,7 @@ class ConfigImportRenameValidationTest extends KernelTestBase { catch (ConfigImporterException $e) { $this->pass('Expected ConfigImporterException thrown when a renamed configuration entity does not match the existing entity type.'); $expected = [ - SafeMarkup::format('Entity type mismatch on rename. @old_type not equal to @new_type for existing configuration @old_name and staged configuration @new_name.', ['@old_type' => 'node_type', '@new_type' => 'config_test', '@old_name' => 'node.type.' . $content_type->id(), '@new_name' => 'config_test.dynamic.' . $test_entity_id]) + new FormattableMarkup('Entity type mismatch on rename. @old_type not equal to @new_type for existing configuration @old_name and staged configuration @new_name.', ['@old_type' => 'node_type', '@new_type' => 'config_test', '@old_name' => 'node.type.' . $content_type->id(), '@new_name' => 'config_test.dynamic.' . $test_entity_id]), ]; $this->assertEqual($expected, $this->configImporter->getErrors()); } @@ -135,7 +134,7 @@ class ConfigImportRenameValidationTest extends KernelTestBase { // UUIDs match. $this->configImporter->reset(); $expected = [ - 'config_test.old::config_test.new' + 'config_test.old::config_test.new', ]; $renames = $this->configImporter->getUnprocessedConfiguration('rename'); $this->assertSame($expected, $renames); @@ -149,7 +148,7 @@ class ConfigImportRenameValidationTest extends KernelTestBase { catch (ConfigImporterException $e) { $this->pass('Expected ConfigImporterException thrown when simple configuration is renamed.'); $expected = [ - SafeMarkup::format('Rename operation for simple configuration. Existing configuration @old_name and staged configuration @new_name.', ['@old_name' => 'config_test.old', '@new_name' => 'config_test.new']) + new FormattableMarkup('Rename operation for simple configuration. Existing configuration @old_name and staged configuration @new_name.', ['@old_name' => 'config_test.old', '@new_name' => 'config_test.new']), ]; $this->assertEqual($expected, $this->configImporter->getErrors()); }