You are here

public function InfoParserUnitTest::providerLifecycleLink in Drupal 10

Same name and namespace in other branches
  1. 9 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 524

Class

InfoParserUnitTest
Tests InfoParser class and exception.

Namespace

Drupal\Tests\Core\Extension

Code

public 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.",
    ],
  ];
}