function LegacyRequirementSeverityTest::requirementProvider
Data provider for requirement helper test.
Return value
array Test data.
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Extension/ LegacyRequirementSeverityTest.php, line 41
Class
- LegacyRequirementSeverityTest
- Tests the legacy requirements severity deprecations.
Namespace
Drupal\KernelTests\Core\ExtensionCode
public static function requirementProvider() : array {
$info = [
'title' => 'Foo',
'severity' => \REQUIREMENT_INFO,
];
$warning = [
'title' => 'Baz',
'severity' => \REQUIREMENT_WARNING,
];
$error = [
'title' => 'Wiz',
'severity' => \REQUIREMENT_ERROR,
];
$ok = [
'title' => 'Bar',
'severity' => \REQUIREMENT_OK,
];
return [
'error is most severe' => [
[
$info,
$error,
$ok,
],
\REQUIREMENT_ERROR,
],
'ok is most severe' => [
[
$info,
$ok,
],
\REQUIREMENT_OK,
],
'warning is most severe' => [
[
$warning,
$info,
$ok,
],
\REQUIREMENT_WARNING,
],
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.