diff --git a/core/modules/config/src/Tests/ConfigImporterTest.php b/core/modules/config/src/Tests/ConfigImporterTest.php index 0e695bf..4e48190 100644 --- a/core/modules/config/src/Tests/ConfigImporterTest.php +++ b/core/modules/config/src/Tests/ConfigImporterTest.php @@ -295,7 +295,7 @@ function testSecondaryWriteSecondaryFirst() { $logs = $this->configImporter->getErrors(); $this->assertEqual(count($logs), 1); - $this->assertEqual($logs[0], SafeMarkup::format("Unexpected error during import with operation @op for @name: 'config_test' entity with ID '@name_secondary' already exists.", array('@op' => 'create', '@name' => $name_primary, '@name_secondary' => 'secondary'))); + $this->assertEqual($logs[0], SafeMarkup::format("Unexpected error during import with operation @op for @name: @message", array('@op' => 'create', '@name' => $name_primary, '@message' => "'config_test' entity with ID 'secondary' already exists."))); } /** diff --git a/core/modules/migrate/tests/src/Unit/MigrateExecutableTest.php b/core/modules/migrate/tests/src/Unit/MigrateExecutableTest.php index 97d7662..f749dcb 100644 --- a/core/modules/migrate/tests/src/Unit/MigrateExecutableTest.php +++ b/core/modules/migrate/tests/src/Unit/MigrateExecutableTest.php @@ -7,6 +7,7 @@ namespace Drupal\Tests\migrate\Unit; +use Drupal\Component\Utility\Html; use Drupal\migrate\Entity\MigrationInterface; use Drupal\migrate\Plugin\MigrateIdMapInterface; use Drupal\migrate\MigrateException; @@ -72,7 +73,7 @@ public function testImportWithFailingRewind() { // Ensure that a message with the proper message was added. $this->message->expects($this->once()) ->method('display') - ->with("Migration failed with source plugin exception: $exception_message"); + ->with("Migration failed with source plugin exception: " . Html::escape($exception_message)); $result = $this->executable->import(); $this->assertEquals(MigrationInterface::RESULT_FAILED, $result);