You are here

public function Fixtures::projectFixtureDir in Drupal 8

Same name and namespace in other branches
  1. 9 core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Fixtures.php \Drupal\Tests\Composer\Plugin\Scaffold\Fixtures::projectFixtureDir()

Gets the path to one particular project fixture.

Parameters

string $project_name: The project name to get the path for.

Return value

string Path to project fixture.

1 call to Fixtures::projectFixtureDir()
Fixtures::sourcePath in core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Fixtures.php
Gets a path to a source scaffold fixture.

File

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

Class

Fixtures
Convenience class for creating fixtures.

Namespace

Drupal\Tests\Composer\Plugin\Scaffold

Code

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