diff --git a/core/tests/Drupal/Tests/ComposerIntegrationTest.php b/core/tests/Drupal/Tests/ComposerIntegrationTest.php
index a7900f7..dd52b2a 100644
--- a/core/tests/Drupal/Tests/ComposerIntegrationTest.php
+++ b/core/tests/Drupal/Tests/ComposerIntegrationTest.php
@@ -60,11 +60,17 @@ protected function getPaths() {
    */
   public function testComposerJson() {
     foreach ($this->getPaths() as $path) {
-      $json = file_get_contents($path . '/composer.json');
+      $file = $path . '/composer.json';
+      if (file_exists($file)) {
+        $json = file_get_contents($path . '/composer.json');
 
-      $result = json_decode($json);
-      if (is_null($result)) {
-        $this->fail($this->getErrorMessages()[json_last_error()]);
+        $result = json_decode($json);
+        if (is_null($result)) {
+          $this->fail($this->getErrorMessages()[json_last_error()]);
+        }
+      }
+      elseif ($file != $this->root . '/composer.json') {
+        $this->fail("File $file not found.");
       }
     }
   }
