function Fixtures::binFixtureDir

Same name in other branches
  1. 8.9.x core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Fixtures.php \Drupal\Tests\Composer\Plugin\Scaffold\Fixtures::binFixtureDir()
  2. 10 core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Fixtures.php \Drupal\Tests\Composer\Plugin\Scaffold\Fixtures::binFixtureDir()
  3. 11.x core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Fixtures.php \Drupal\Tests\Composer\Plugin\Scaffold\Fixtures::binFixtureDir()

Gets the path to one particular bin path.

Parameters

string $bin_name: The bin name to get the path for.

Return value

string Path to project fixture.

File

core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Fixtures.php, line 135

Class

Fixtures
Convenience class for creating fixtures.

Namespace

Drupal\Tests\Composer\Plugin\Scaffold

Code

public function binFixtureDir($bin_name) {
    $dir = $this->allFixturesDir() . '/scripts/' . $bin_name;
    if (!is_dir($dir)) {
        throw new \RuntimeException("Requested fixture bin dir {$bin_name} that does not exist.");
    }
    return $dir;
}

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