diff --git a/core/tests/Drupal/Tests/ComposerIntegrationTest.php b/core/tests/Drupal/Tests/ComposerIntegrationTest.php index e7012e8..266cbeb 100644 --- a/core/tests/Drupal/Tests/ComposerIntegrationTest.php +++ b/core/tests/Drupal/Tests/ComposerIntegrationTest.php @@ -188,7 +188,14 @@ public function testAllModulesReplaced() { * testing in https://www.drupal.org/node/2874198 */ public function testMinPHPVersion() { - $lock = json_decode(file_get_contents($this->root . '/composer.lock'), TRUE); + // Check for lockfile in the application root. If the lockfile does not + // exist, then skip this test. + $lockfile = $this->root . '/composer.lock'; + if (!file_exists($lockfile)) { + $this->markTestSkipped('/composer.lock is not available.'); + } + + $lock = json_decode(file_get_contents($lockfile), TRUE); foreach ($lock['packages'] as $package) { if (isset($package['require']['php'])) {