function ExtensionVersionTest::providerCreateFromSupportBranch

Same name and namespace in other branches
  1. 10 core/tests/Drupal/Tests/Core/Extension/ExtensionVersionTest.php \Drupal\Tests\Core\Extension\ExtensionVersionTest::providerCreateFromSupportBranch()
  2. 11.x core/tests/Drupal/Tests/Core/Extension/ExtensionVersionTest.php \Drupal\Tests\Core\Extension\ExtensionVersionTest::providerCreateFromSupportBranch()

Data provider for testCreateFromSupportBranch().

Return value

string[][] The test cases for testCreateFromSupportBranch().

File

core/tests/Drupal/Tests/Core/Extension/ExtensionVersionTest.php, line 369

Class

ExtensionVersionTest
@coversDefaultClass <a href="/api/drupal/core%21lib%21Drupal%21Core%21Extension%21ExtensionVersion.php/class/ExtensionVersion/9" title="Provides an extension version value object." class="local">\Drupal\Core\Extension\ExtensionVersion</a>

Namespace

Drupal\Tests\Core\Extension

Code

public function providerCreateFromSupportBranch() : array {
    // Data provider values are:
    // - The version number to test.
    // - Array of expected version information with the following keys:
    //   -'major': The expected result from ::getMajorVersion().
    //   -'extra': The expected result from ::getVersionExtra().
    return [
        '0.' => [
            '0.',
            '0',
        ],
        '1.' => [
            '1.',
            '1',
        ],
        '0.1.' => [
            '0.1.',
            '0',
        ],
        '1.2.' => [
            '1.2.',
            '1',
        ],
        '8.x-1.' => [
            '8.x-1.',
            '1',
        ],
    ];
}

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