Fixtures.php

Same filename in this branch
  1. 11.x core/tests/Drupal/Tests/Composer/Generator/Fixtures.php
  2. 11.x core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Fixtures.php
Same filename in other branches
  1. 9 core/tests/Drupal/Tests/Composer/Generator/Fixtures.php
  2. 9 core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Fixtures.php
  3. 8.9.x core/tests/Drupal/Tests/Composer/Generator/Fixtures.php
  4. 8.9.x core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Fixtures.php
  5. 10 core/tests/Drupal/Tests/Composer/Generator/Fixtures.php
  6. 10 core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Fixtures.php

Namespace

Drupal\Tests\Composer\Plugin\Unpack

File

core/tests/Drupal/Tests/Composer/Plugin/Unpack/Fixtures.php

View source
<?php

declare (strict_types=1);
namespace Drupal\Tests\Composer\Plugin\Unpack;

use Drupal\Tests\Composer\Plugin\FixturesBase;

/**
 * Fixture for testing the unpack composer plugin.
 */
class Fixtures extends FixturesBase {
    
    /**
     * {@inheritdoc}
     */
    public function projectRoot() : string {
        return realpath(__DIR__) . '/../../../../../../../composer/Plugin/RecipeUnpack';
    }
    
    /**
     * {@inheritdoc}
     */
    public function allFixturesDir() : string {
        return realpath(__DIR__ . '/fixtures');
    }
    
    /**
     * {@inheritdoc}
     */
    public function tmpDir(string $prefix) : string {
        $prefix .= static::persistentPrefix();
        $tmpDir = sys_get_temp_dir() . '/unpack-' . $prefix . uniqid(md5($prefix . microtime()), TRUE);
        $this->tmpDirs[] = $tmpDir;
        return $tmpDir;
    }

}

Classes

Title Deprecated Summary
Fixtures Fixture for testing the unpack composer plugin.

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