function Fixtures::getLocationReplacements

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()
  2. 8.9.x core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Fixtures.php \Drupal\Tests\Composer\Plugin\Scaffold\Fixtures::getLocationReplacements()
  3. 10 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 178

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;
}

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