public function ExtensionVersionTest::testCreateFromSupportBranch in Drupal 10
Same name and namespace in other branches
- 9 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 355
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
->assertSame(NULL, $version
->getVersionExtra());
}