You are here

public function Fixtures::replaceOp in Drupal 10

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

Creates a ReplaceOp fixture.

Parameters

string $project_name: The name of the project to fetch; $package_name is "fixtures/$project_name".

string $source: The name of the asset; path is "assets/$source".

Return value

\Drupal\Composer\Plugin\Scaffold\Operations\ReplaceOp A replace operation object.

File

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

Class

Fixtures
Convenience class for creating fixtures.

Namespace

Drupal\Tests\Composer\Plugin\Scaffold

Code

public function replaceOp($project_name, $source) {
  $source_path = $this
    ->sourcePath($project_name, $source);
  return new ReplaceOp($source_path, TRUE);
}