diff --git a/core/tests/Drupal/BuildTests/Framework/BuildTestBase.php b/core/tests/Drupal/BuildTests/Framework/BuildTestBase.php
index a91e02156783d47cc6cbd7fa1df32e95aad2ee8b..ded5b3104128c29b349b36d13847162a056a7279 100644
--- a/core/tests/Drupal/BuildTests/Framework/BuildTestBase.php
+++ b/core/tests/Drupal/BuildTests/Framework/BuildTestBase.php
@@ -567,6 +567,10 @@ public function copyCodebase(\Iterator $iterator = NULL, $working_dir = NULL) {
    * - Call the method to get a default Finder object which can then be
    *   modified for other purposes.
    *
+   * Note that the vendor directory is deliberately not included in the
+   * directory exclusions here, so that packages are copied and composer does
+   * not attempt to download them from packagist/github during test runs.
+   *
    * @return \Symfony\Component\Finder\Finder
    *   A Finder object ready to iterate over core codebase.
    */
@@ -577,7 +581,6 @@ public function getCodebaseFinder() {
       ->in($this->getDrupalRoot())
       ->notPath('#^sites/default/files#')
       ->notPath('#^sites/simpletest#')
-      ->notPath('#^vendor#')
       ->notPath('#^core/node_modules#')
       ->notPath('#^sites/default/settings\..*php#')
       ->ignoreDotFiles(FALSE)
diff --git a/core/tests/Drupal/BuildTests/Framework/Tests/BuildTestTest.php b/core/tests/Drupal/BuildTests/Framework/Tests/BuildTestTest.php
index 5945dfb14cdbebd8604dc60e873850998760e23b..5eeca68e12ea9a55995b461d086f7f6c7b03d666 100644
--- a/core/tests/Drupal/BuildTests/Framework/Tests/BuildTestTest.php
+++ b/core/tests/Drupal/BuildTests/Framework/Tests/BuildTestTest.php
@@ -74,13 +74,6 @@ public function testCopyCodebaseExclude() {
           ],
         ],
       ],
-      'vendor' => [
-        'composer' => [
-          'composer' => [
-            'installed.json' => '"items": {"things"}',
-          ],
-        ],
-      ],
       'modules' => [
         'my_module' => [
           'vendor' => [