function PhpTufValidatorTest::setUp

Overrides PackageManagerKernelTestBase::setUp

File

core/modules/package_manager/tests/src/Kernel/PhpTufValidatorTest.php, line 27

Class

PhpTufValidatorTest
@coversDefaultClass \Drupal\package_manager\Validator\PhpTufValidator @group package_manager @internal

Namespace

Drupal\Tests\package_manager\Kernel

Code

protected function setUp() : void {
    parent::setUp();
    // PHP-TUF must be enabled for this test to run.
    $this->setSetting('package_manager_bypass_tuf', FALSE);
    (new ActiveFixtureManipulator())->addConfig([
        'repositories.drupal' => [
            'type' => 'composer',
            'url' => 'https://packages.drupal.org/8',
            'tuf' => TRUE,
        ],
        'allow-plugins.' . PhpTufValidator::PLUGIN_NAME => TRUE,
    ])
        ->addPackage([
        'name' => PhpTufValidator::PLUGIN_NAME,
        'type' => 'composer-plugin',
        'require' => [
            'composer-plugin-api' => '*',
        ],
        'extra' => [
            'class' => 'PhpTufComposerPlugin',
        ],
    ])
        ->commitChanges();
}

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