diff --git a/core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Functional/ManageGitIgnoreTest.php b/core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Functional/ManageGitIgnoreTest.php
index 9e50d3c92bf077f9e03cbbea9a107fe814cfd831..25da3d51195457bb8e6083b4572964b013763220 100644
--- a/core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Functional/ManageGitIgnoreTest.php
+++ b/core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Functional/ManageGitIgnoreTest.php
@@ -248,7 +248,7 @@ public function testUnmanagedGitIgnoreWhenGitNotAvailable() {
   - Copy [web-root]/robots.txt from assets/robots-default.txt
 
 EOT;
-    $this->assertEquals($expected, $output);
+    $this->assertStringContainsString($expected, $output);
     $this->assertFileExists($sut . '/docroot/index.php');
     $this->assertFileDoesNotExist($sut . '/docroot/sites/default/.gitignore');
   }