function ComponentsIsolatedBuildTest::provideComponentPaths

Same name and namespace in other branches
  1. 9 core/tests/Drupal/BuildTests/Composer/Component/ComponentsIsolatedBuildTest.php \Drupal\BuildTests\Composer\Component\ComponentsIsolatedBuildTest::provideComponentPaths()
  2. 10 core/tests/Drupal/BuildTests/Composer/Component/ComponentsIsolatedBuildTest.php \Drupal\BuildTests\Composer\Component\ComponentsIsolatedBuildTest::provideComponentPaths()

Provides an array with relative paths to the component paths.

Return value

array An array with relative paths to the component paths.

1 call to ComponentsIsolatedBuildTest::provideComponentPaths()
ComponentsIsolatedBuildTest::addExpectedRepositories in core/tests/Drupal/BuildTests/Composer/Component/ComponentsIsolatedBuildTest.php
Adds expected repositories as path repositories to package under test.

File

core/tests/Drupal/BuildTests/Composer/Component/ComponentsIsolatedBuildTest.php, line 28

Class

ComponentsIsolatedBuildTest
Try to install dependencies per component, using Composer.

Namespace

Drupal\BuildTests\Composer\Component

Code

public static function provideComponentPaths() : array {
    $data = [];
    // During the dataProvider phase, there is not a workspace directory yet.
    // So we will find relative paths and assemble them with the workspace
    // path later.
    $drupal_root = self::getDrupalRootStatic();
    $composer_json_finder = self::getComponentPathsFinder($drupal_root);
    
    /** @var \Symfony\Component\Finder\SplFileInfo $path */
    foreach ($composer_json_finder->getIterator() as $path) {
        $data[$path->getRelativePath()] = [
            '/' . $path->getRelativePath(),
        ];
    }
    return $data;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.