You are here

public function Fixtures::getLocationReplacements 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::getLocationReplacements()

Gets an Interpolator with 'web-root' and 'package-name' set.

Use in place of ManageOptions::getLocationReplacements().

Return value

\Drupal\Composer\Plugin\Scaffold\Interpolator An interpolator with location replacements, including 'web-root'.

See also

\Drupal\Composer\Plugin\Scaffold\ManageOptions::getLocationReplacements()

1 call to Fixtures::getLocationReplacements()
Fixtures::destinationPath in core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Fixtures.php
Gets a destination path in a tmp dir.

File

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

Class

Fixtures
Convenience class for creating fixtures.

Namespace

Drupal\Tests\Composer\Plugin\Scaffold

Code

public function getLocationReplacements() {
  $destinationTmpDir = $this
    ->mkTmpDir('location-replacements');
  $interpolator = new Interpolator();
  $interpolator
    ->setData([
    'web-root' => $destinationTmpDir,
    'package-name' => 'fixtures/tmp-destination',
  ]);
  return $interpolator;
}