function RequirementSeverityTest::requirementProvider
Data provider for requirement helper test.
File
-
core/
tests/ Drupal/ Tests/ Core/ Extension/ Requirement/ RequirementSeverityTest.php, line 59
Class
- RequirementSeverityTest
- @coversDefaultClass \Drupal\Core\Extension\Requirement\RequirementSeverity
Namespace
Drupal\Tests\Core\Extension\RequirementCode
public static function requirementProvider() : array {
$info = [
'title' => 'Foo',
'severity' => RequirementSeverity::Info,
];
$warning = [
'title' => 'Baz',
'severity' => RequirementSeverity::Warning,
];
$error = [
'title' => 'Wiz',
'severity' => RequirementSeverity::Error,
];
$ok = [
'title' => 'Bar',
'severity' => RequirementSeverity::OK,
];
return [
'error is most severe' => [
[
$info,
$error,
$ok,
],
RequirementSeverity::Error,
],
'ok is most severe' => [
[
$info,
$ok,
],
RequirementSeverity::OK,
],
'warning is most severe' => [
[
$warning,
$info,
$ok,
],
RequirementSeverity::Warning,
],
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.