public function ModuleVersionTest::testGetMajorVersion in Drupal 9
Same name and namespace in other branches
- 8 core/modules/update/tests/src/Unit/ModuleVersionTest.php \Drupal\Tests\update\Unit\ModuleVersionTest::testGetMajorVersion()
@covers ::getMajorVersion
@dataProvider providerVersionInfos
Parameters
string $version: The version string to test.
array $expected_version_info: The expected version information.
File
- core/
modules/ update/ tests/ src/ Unit/ ModuleVersionTest.php, line 26
Class
- ModuleVersionTest
- @coversDefaultClass \Drupal\update\ModuleVersion
Namespace
Drupal\Tests\update\UnitCode
public function testGetMajorVersion($version, array $expected_version_info) {
$version = ModuleVersion::createFromVersionString($version);
$this
->assertSame($expected_version_info['major'], $version
->getMajorVersion());
}