function ComposerPluginsValidatorTest::testValidationDuringPreCreate

Tests composer plugins are validated during pre-create.

@dataProvider providerSimpleValidCases @dataProvider providerSimpleInvalidCases @dataProvider providerComplexInvalidCases

1 call to ComposerPluginsValidatorTest::testValidationDuringPreCreate()
ComposerPluginsValidatorTest::testValidationAfterTrustingDuringPreCreate in core/modules/package_manager/tests/src/Kernel/ComposerPluginsValidatorTest.php
Tests additional composer plugins can be trusted during pre-create.

File

core/modules/package_manager/tests/src/Kernel/ComposerPluginsValidatorTest.php, line 65

Class

ComposerPluginsValidatorTest
@covers \Drupal\package_manager\Validator\ComposerPluginsValidator @group package_manager @internal

Namespace

Drupal\Tests\package_manager\Kernel

Code

public function testValidationDuringPreCreate(array $composer_config_to_add, array $packages_to_add, array $expected_results) : void {
    $active_manipulator = new ActiveFixtureManipulator();
    if ($composer_config_to_add) {
        $active_manipulator->addConfig($composer_config_to_add);
    }
    foreach ($packages_to_add as $package) {
        $active_manipulator->addPackage($package);
    }
    $active_manipulator->commitChanges();
    $this->assertStatusCheckResults($expected_results);
    $this->assertResults($expected_results, PreCreateEvent::class);
}

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