function ExtensionVersionTest::testCreateFromSupportBranch
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Extension/ExtensionVersionTest.php \Drupal\Tests\Core\Extension\ExtensionVersionTest::testCreateFromSupportBranch()
- 10 core/tests/Drupal/Tests/Core/Extension/ExtensionVersionTest.php \Drupal\Tests\Core\Extension\ExtensionVersionTest::testCreateFromSupportBranch()
@covers ::createFromSupportBranch
@dataProvider providerCreateFromSupportBranch
Parameters
string $branch: The branch to test.
string $expected_major: The expected major version.
File
-
core/
tests/ Drupal/ Tests/ Core/ Extension/ ExtensionVersionTest.php, line 357
Class
- ExtensionVersionTest
- @coversDefaultClass \Drupal\Core\Extension\ExtensionVersion
Namespace
Drupal\Tests\Core\ExtensionCode
public function testCreateFromSupportBranch(string $branch, string $expected_major) : void {
$version = ExtensionVersion::createFromSupportBranch($branch);
$this->assertInstanceOf(ExtensionVersion::class, $version);
$this->assertSame($expected_major, $version->getMajorVersion());
// Version extra can't be determined from a branch.
$this->assertNull($version->getVersionExtra());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.