Verified Commit 78e5aa8c authored by Dave Long's avatar Dave Long
Browse files

Issue #3386479 by catch, alexpott: Copy less files around in ComponentsIsolatedBuildTest

(cherry picked from commit dd62dc1e)
parent ccbd702c
Loading
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@

use Drupal\BuildTests\Composer\ComposerBuildTestBase;
use Drupal\Composer\Composer;
use Symfony\Component\Finder\Finder;

/**
 * Try to install dependencies per component, using Composer.
@@ -34,7 +35,7 @@ public function provideComponentPaths(): array {

    /** @var \Symfony\Component\Finder\SplFileInfo $path */
    foreach ($composer_json_finder->getIterator() as $path) {
      $data[] = ['/' . $path->getRelativePath()];
      $data[$path->getRelativePath()] = ['/' . $path->getRelativePath()];
    }
    return $data;
  }
@@ -47,8 +48,12 @@ public function provideComponentPaths(): array {
  public function testComponentComposerJson(string $component_path): void {
    // Only copy the components. Copy all of them because some of them depend on
    // each other.
    $finder = $this->getCodebaseFinder();
    $finder->in($this->getDrupalRoot() . static::$componentsPath);
    $finder = new Finder();
    $finder->files()
      ->ignoreUnreadableDirs()
      ->in($this->getDrupalRoot() . static::$componentsPath)
      ->ignoreDotFiles(FALSE)
      ->ignoreVCS(FALSE);
    $this->copyCodebase($finder->getIterator());

    $working_dir = $this->getWorkingPath() . static::$componentsPath . $component_path;