function PhpTufValidatorTest::providerInvalidConfiguration

Data provider for testing invalid plugin configuration.

Return value

array[] The test cases.

1 call to PhpTufValidatorTest::providerInvalidConfiguration()
PhpTufValidatorTest::providerInvalidConfigurationInStage in core/modules/package_manager/tests/src/Kernel/PhpTufValidatorTest.php
Data provider for testing invalid plugin configuration in the stage.

File

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

Class

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

Namespace

Drupal\Tests\package_manager\Kernel

Code

public static function providerInvalidConfiguration() : array {
    return [
        'plugin specifically disallowed' => [
            [
                'allow-plugins.' . PhpTufValidator::PLUGIN_NAME => FALSE,
            ],
            [
                t('The <code>php-tuf/composer-integration</code> plugin is not listed as an allowed plugin.'),
            ],
        ],
        'all plugins disallowed' => [
            [
                'allow-plugins' => FALSE,
            ],
            [
                t('The <code>php-tuf/composer-integration</code> plugin is not listed as an allowed plugin.'),
            ],
        ],
        'packages.drupal.org not using TUF' => [
            [
                'repositories.drupal' => [
                    'type' => 'composer',
                    'url' => 'https://packages.drupal.org/8',
                ],
            ],
            [
                t('TUF is not enabled for the <code>https://packages.drupal.org/8</code> repository.'),
            ],
        ],
    ];
}

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