public function InfoParserUnitTest::providerCoreIncompatibility in Drupal 9
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Extension/InfoParserUnitTest.php \Drupal\Tests\Core\Extension\InfoParserUnitTest::providerCoreIncompatibility()
Data provider for testCoreIncompatibility().
File
- core/
tests/ Drupal/ Tests/ Core/ Extension/ InfoParserUnitTest.php, line 589
Class
- InfoParserUnitTest
- Tests InfoParser class and exception.
Namespace
Drupal\Tests\Core\ExtensionCode
public function providerCoreIncompatibility() {
list($major, $minor) = explode('.', \Drupal::VERSION);
$next_minor = $minor + 1;
$next_major = $major + 1;
return [
'next_minor' => [
'next_minor',
"^{$major}.{$next_minor}",
TRUE,
],
'current_major_next_major' => [
'current_major_next_major',
"^{$major} || ^{$next_major}",
FALSE,
],
'previous_major_next_major' => [
'previous_major_next_major',
"^1 || ^{$next_major}",
TRUE,
],
'current_minor' => [
'current_minor',
"~{$major}.{$minor}",
FALSE,
],
];
}