function FixtureManipulatorTest::setUp

Overrides PackageManagerKernelTestBase::setUp

File

core/modules/package_manager/tests/src/Kernel/FixtureManipulatorTest.php, line 54

Class

FixtureManipulatorTest
@coversDefaultClass \Drupal\fixture_manipulator\FixtureManipulator

Namespace

Drupal\Tests\package_manager\Kernel

Code

protected function setUp() : void {
    parent::setUp();
    $this->dir = $this->container
        ->get(PathLocator::class)
        ->getProjectRoot();
    $this->inspector = $this->container
        ->get(ComposerInspector::class);
    $manipulator = new ActiveFixtureManipulator();
    $manipulator->addPackage([
        'name' => 'my/package',
        'type' => 'library',
        'version' => '1.2.3',
    ])
        ->addPackage([
        'name' => 'my/dev-package',
        'version' => '2.1.0',
        'type' => 'library',
    ], TRUE)
        ->commitChanges();
    $this->originalFixturePackages = $this->inspector
        ->getInstalledPackagesList($this->dir);
}

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