function InfoParserUnitTest::providerLifecycleLink

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Core/Extension/InfoParserUnitTest.php \Drupal\Tests\Core\Extension\InfoParserUnitTest::providerLifecycleLink()
  2. 10 core/tests/Drupal/Tests/Core/Extension/InfoParserUnitTest.php \Drupal\Tests\Core\Extension\InfoParserUnitTest::providerLifecycleLink()

Data provider for testLifecycleLink().

File

core/tests/Drupal/Tests/Core/Extension/InfoParserUnitTest.php, line 501

Class

InfoParserUnitTest
Tests InfoParser class and exception.

Namespace

Drupal\Tests\Core\Extension

Code

public static function providerLifecycleLink() {
    return [
        'valid deprecated' => [
            ExtensionLifecycle::DEPRECATED,
            'http://example.com',
        ],
        'valid obsolete' => [
            ExtensionLifecycle::OBSOLETE,
            'http://example.com',
        ],
        'valid stable' => [
            ExtensionLifecycle::STABLE,
        ],
        'valid experimental' => [
            ExtensionLifecycle::EXPERIMENTAL,
        ],
        'missing deprecated' => [
            ExtensionLifecycle::DEPRECATED,
            NULL,
            "Extension Module for That (%s) has 'lifecycle: deprecated' but is missing a 'lifecycle_link' entry.",
        ],
        'missing obsolete' => [
            ExtensionLifecycle::OBSOLETE,
            NULL,
            "Extension Module for That (%s) has 'lifecycle: obsolete' but is missing a 'lifecycle_link' entry.",
        ],
        'invalid deprecated' => [
            ExtensionLifecycle::DEPRECATED,
            'look ma, not a url',
            "Extension Module for That (%s) has a 'lifecycle_link' entry that is not a valid URL.",
        ],
        'invalid obsolete' => [
            ExtensionLifecycle::OBSOLETE,
            'I think you may find that this is also not a url',
            "Extension Module for That (%s) has a 'lifecycle_link' entry that is not a valid URL.",
        ],
    ];
}

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