function SecurityAdvisoriesFetcherTest::providerShowAdvisories

Same name and namespace in other branches
  1. 9 core/modules/system/tests/src/Kernel/SecurityAdvisories/SecurityAdvisoriesFetcherTest.php \Drupal\Tests\system\Kernel\SecurityAdvisories\SecurityAdvisoriesFetcherTest::providerShowAdvisories()
  2. 10 core/modules/system/tests/src/Kernel/SecurityAdvisories/SecurityAdvisoriesFetcherTest.php \Drupal\Tests\system\Kernel\SecurityAdvisories\SecurityAdvisoriesFetcherTest::providerShowAdvisories()

Data provider for testShowAdvisories().

File

core/modules/system/tests/src/Kernel/SecurityAdvisories/SecurityAdvisoriesFetcherTest.php, line 94

Class

SecurityAdvisoriesFetcherTest
@coversDefaultClass <a href="/api/drupal/core%21modules%21system%21src%21SecurityAdvisories%21SecurityAdvisoriesFetcher.php/class/SecurityAdvisoriesFetcher/11.x" title="Defines a service to get security advisories." class="local">\Drupal\system\SecurityAdvisories\SecurityAdvisoriesFetcher</a>

Namespace

Drupal\Tests\system\Kernel\SecurityAdvisories

Code

public static function providerShowAdvisories() : array {
    return [
        'contrib:exact:non-psa' => [
            'feed_item' => [
                'is_psa' => 0,
                'type' => 'module',
                'project' => 'the_project',
                'insecure' => [
                    '8.x-1.0',
                ],
            ],
            'existing_version' => '8.x-1.0',
        ],
        'contrib:semver:non-psa' => [
            'feed_item' => [
                'is_psa' => 0,
                'type' => 'module',
                'project' => 'the_project',
                'insecure' => [
                    '1.0.0',
                ],
            ],
            'existing_version' => '1.0.0',
        ],
        'contrib:exact:psa' => [
            'feed_item' => [
                'is_psa' => 1,
                'type' => 'module',
                'project' => 'the_project',
                'insecure' => [
                    '8.x-1.0',
                ],
            ],
            'existing_version' => '8.x-1.0',
        ],
        'contrib:not-exact:psa' => [
            'feed_item' => [
                'is_psa' => 1,
                'type' => 'module',
                'project' => 'the_project',
                'insecure' => [
                    '8.x-1.0',
                ],
            ],
            'existing_version' => '1.0',
        ],
        'contrib:non-matching:psa' => [
            'feed_item' => [
                'is_psa' => 1,
                'type' => 'module',
                'project' => 'the_project',
                'insecure' => [
                    '8.x-1.0',
                ],
            ],
            'existing_version' => '8.x-2.0',
        ],
        'contrib:no-insecure:psa' => [
            'feed_item' => [
                'is_psa' => 1,
                'type' => 'module',
                'project' => 'the_project',
                'insecure' => [],
            ],
            'existing_version' => '8.x-2.0',
        ],
        'contrib:no-existing-version:psa' => [
            'feed_item' => [
                'is_psa' => 1,
                'type' => 'module',
                'project' => 'the_project',
                'insecure' => [
                    '8.x-2.0',
                ],
            ],
            'existing_version' => '',
        ],
        'contrib:dev:psa' => [
            'feed_item' => [
                'is_psa' => 1,
                'type' => 'module',
                'project' => 'the_project',
                'insecure' => [],
            ],
            'existing_version' => '8.x-2.x-dev',
        ],
        'contrib:existing-dev-match-minor:non-psa' => [
            'feed_item' => [
                'is_psa' => 0,
                'type' => 'module',
                'project' => 'the_project',
                'insecure' => [
                    '8.x-1.0',
                ],
            ],
            'existing_version' => '8.x-1.x-dev',
        ],
        'contrib:existing-dev-match-major-semver:non-psa' => [
            'feed_item' => [
                'is_psa' => 0,
                'type' => 'module',
                'project' => 'the_project',
                'insecure' => [
                    '8.1.1',
                ],
            ],
            'existing_version' => '8.x-dev',
        ],
        'contrib:existing-dev-match-minor-semver:non-psa' => [
            'feed_item' => [
                'is_psa' => 0,
                'type' => 'module',
                'project' => 'the_project',
                'insecure' => [
                    '8.2.1',
                ],
            ],
            'existing_version' => '8.2.x-dev',
        ],
        'core:exact:psa' => [
            'feed_item' => [
                'is_psa' => 1,
                'type' => 'core',
                'project' => 'drupal',
                'insecure' => [
                    \Drupal::VERSION,
                ],
            ],
        ],
        'core:exact:non-psa' => [
            'feed_item' => [
                'is_psa' => 0,
                'type' => 'core',
                'project' => 'drupal',
                'insecure' => [
                    \Drupal::VERSION,
                ],
            ],
        ],
        'core:not-exact:psa' => [
            'feed_item' => [
                'is_psa' => 1,
                'type' => 'core',
                'project' => 'drupal',
                'insecure' => [
                    '9.1',
                ],
            ],
        ],
        'core:non-matching:psa' => [
            'feed_item' => [
                'is_psa' => 1,
                'type' => 'core',
                'project' => 'drupal',
                'insecure' => [
                    '9.0.0',
                ],
            ],
        ],
        'core:no-insecure:psa' => [
            'feed_item' => [
                'is_psa' => 1,
                'type' => 'core',
                'project' => 'drupal',
                'insecure' => [],
            ],
        ],
    ];
}

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