diff --git a/core/tests/bootstrap.php b/core/tests/bootstrap.php
index 31ac4cd..e80381e 100644
--- a/core/tests/bootstrap.php
+++ b/core/tests/bootstrap.php
@@ -80,6 +80,11 @@ function drupal_phpunit_get_extension_namespaces($dirs) {
   return $namespaces;
 }
 
+// We define the COMPOSER_INSTALL constant, so that PHPUnit knows where to
+// autoload from. This is needed for tests run in isolation mode.
+if (!defined('PHPUNIT_COMPOSER_INSTALL')) {
+  define('PHPUNIT_COMPOSER_INSTALL', __DIR__ . '/../../autoload.php');
+}
 // Start with classes in known locations.
 $loader = require __DIR__ . '/../../autoload.php';
 $loader->add('Drupal\\Tests', __DIR__);
