function ExtensionVersionTest::testGetMajorVersion
Same name and namespace in other branches
- 11.x core/tests/Drupal/Tests/Core/Extension/ExtensionVersionTest.php \Drupal\Tests\Core\Extension\ExtensionVersionTest::testGetMajorVersion()
- 10 core/tests/Drupal/Tests/Core/Extension/ExtensionVersionTest.php \Drupal\Tests\Core\Extension\ExtensionVersionTest::testGetMajorVersion()
- 9 core/tests/Drupal/Tests/Core/Extension/ExtensionVersionTest.php \Drupal\Tests\Core\Extension\ExtensionVersionTest::testGetMajorVersion()
Tests get major version.
Attributes
#[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 28
Class
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());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.