public function ExtensionVersionTest::testGetMajorVersion in Drupal 10
Same name and namespace in other branches
- 9 core/tests/Drupal/Tests/Core/Extension/ExtensionVersionTest.php \Drupal\Tests\Core\Extension\ExtensionVersionTest::testGetMajorVersion()
@covers ::getMajorVersion
@dataProvider providerVersionInfos
Parameters
string $version: The version string to test.
array $expected_version_info: The expected version information.
File
- core/
tests/ Drupal/ Tests/ Core/ Extension/ ExtensionVersionTest.php, line 25
Class
- ExtensionVersionTest
- @coversDefaultClass \Drupal\Core\Extension\ExtensionVersion
Namespace
Drupal\Tests\Core\ExtensionCode
public function testGetMajorVersion(string $version, array $expected_version_info) : void {
$version = ExtensionVersion::createFromVersionString($version);
$this
->assertSame($expected_version_info['major'], $version
->getMajorVersion());
}