diff --git a/core/modules/migrate/tests/src/Functional/process/DownloadFunctionalTest.php b/core/modules/migrate/tests/src/Functional/process/DownloadFunctionalTest.php index 26f2f3527fc..51371ff69c8 100644 --- a/core/modules/migrate/tests/src/Functional/process/DownloadFunctionalTest.php +++ b/core/modules/migrate/tests/src/Functional/process/DownloadFunctionalTest.php @@ -76,8 +76,11 @@ class DownloadFunctionalTest extends BrowserTestBase { $this->assertCount(1, $messages); $message = reset($messages); + // Assert critical parts of the error message, but not the exact message, + // since it depends on Guzzle's internal implementation of PSR-7. $id = $migration->getPluginId(); - $this->assertEquals("$id:uri:download: Client error: `GET $invalid_url` resulted in a `404 Not Found` response ($invalid_url)", $message->message); + $this->assertStringContainsString("$id:uri:download:", $message->message); + $this->assertStringContainsString($invalid_url, $message->message); $this->assertEquals(MigrationInterface::MESSAGE_ERROR, $message->level); // Check that the second row was migrated successfully. diff --git a/core/tests/Drupal/Tests/BrowserHtmlDebugTrait.php b/core/tests/Drupal/Tests/BrowserHtmlDebugTrait.php index 18deac7e359..aa4a569e3cf 100644 --- a/core/tests/Drupal/Tests/BrowserHtmlDebugTrait.php +++ b/core/tests/Drupal/Tests/BrowserHtmlDebugTrait.php @@ -179,11 +179,14 @@ trait BrowserHtmlDebugTrait { $html_output = 'Called from ' . $caller['function'] . ' line ' . $caller['line']; $html_output .= '