function BuildTestBase::getComposerRoot

Same name and namespace in other branches
  1. 10 core/tests/Drupal/BuildTests/Framework/BuildTestBase.php \Drupal\BuildTests\Framework\BuildTestBase::getComposerRoot()

Gets the path to the Composer root directory.

Return value

string The absolute path to the Composer root directory.

2 calls to BuildTestBase::getComposerRoot()
BuildTestBase::copyCodebase in core/tests/Drupal/BuildTests/Framework/BuildTestBase.php
Copy the current working codebase into a workspace.
BuildTestBase::getWorkingPathDrupalRoot in core/tests/Drupal/BuildTests/Framework/BuildTestBase.php
Gets the working path for Drupal core.

File

core/tests/Drupal/BuildTests/Framework/BuildTestBase.php, line 623

Class

BuildTestBase
Provides a workspace to test build processes.

Namespace

Drupal\BuildTests\Framework

Code

public function getComposerRoot() : string {
    $root = InstalledVersions::getRootPackage();
    return realpath($root['install_path']);
}

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