function ModuleVersionTest::providerVersionInfos
Same name in other branches
- 8.9.x core/modules/update/tests/src/Unit/ModuleVersionTest.php \Drupal\Tests\update\Unit\ModuleVersionTest::providerVersionInfos()
Data provider for expected version information.
Return value
array Arrays of version information.
File
-
core/
modules/ update/ tests/ src/ Unit/ ModuleVersionTest.php, line 52
Class
- ModuleVersionTest
- @coversDefaultClass \Drupal\update\ModuleVersion
Namespace
Drupal\Tests\update\UnitCode
public function providerVersionInfos() {
// Data provider values are:
// - The version number to test.
// - Array of expected version information with the following keys:
// -'major': The expected result from ::getMajorVersion().
// -'extra': The expected result from ::getVersionExtra().
return [
'8.x-1.3' => [
'8.x-1.3',
[
'major' => '1',
'extra' => NULL,
],
],
'8.x-1.0' => [
'8.x-1.0',
[
'major' => '1',
'extra' => NULL,
],
],
'8.x-1.0-alpha1' => [
'8.x-1.0-alpha1',
[
'major' => '1',
'extra' => 'alpha1',
],
],
'8.x-1.3-alpha1' => [
'8.x-1.3-alpha1',
[
'major' => '1',
'extra' => 'alpha1',
],
],
'0.1' => [
'0.1',
[
'major' => '0',
'extra' => NULL,
],
],
'1.0' => [
'1.0',
[
'major' => '1',
'extra' => NULL,
],
],
'1.3' => [
'1.3',
[
'major' => '1',
'extra' => NULL,
],
],
'1.0-alpha1' => [
'1.0-alpha1',
[
'major' => '1',
'extra' => 'alpha1',
],
],
'1.3-alpha1' => [
'1.3-alpha1',
[
'major' => '1',
'extra' => 'alpha1',
],
],
'0.2.0' => [
'0.2.0',
[
'major' => '0',
'extra' => NULL,
],
],
'1.2.0' => [
'1.2.0',
[
'major' => '1',
'extra' => NULL,
],
],
'1.0.3' => [
'1.0.3',
[
'major' => '1',
'extra' => NULL,
],
],
'1.2.3' => [
'1.2.3',
[
'major' => '1',
'extra' => NULL,
],
],
'1.2.0-alpha1' => [
'1.2.0-alpha1',
[
'major' => '1',
'extra' => 'alpha1',
],
],
'1.2.3-alpha1' => [
'1.2.3-alpha1',
[
'major' => '1',
'extra' => 'alpha1',
],
],
'8.x-1.x-dev' => [
'8.x-1.x-dev',
[
'major' => '1',
'extra' => 'dev',
],
],
'8.x-8.x-dev' => [
'8.x-8.x-dev',
[
'major' => '8',
'extra' => 'dev',
],
],
'1.x-dev' => [
'1.x-dev',
[
'major' => '1',
'extra' => 'dev',
],
],
'8.x-dev' => [
'8.x-dev',
[
'major' => '8',
'extra' => 'dev',
],
],
'1.0.x-dev' => [
'1.0.x-dev',
[
'major' => '1',
'extra' => 'dev',
],
],
'1.2.x-dev' => [
'1.2.x-dev',
[
'major' => '1',
'extra' => 'dev',
],
],
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.