public function GetAlertsTest::getActiveAlertsProvider in Site Alert 8
Data provider for ::testGetActiveAlerts().
Return value
array An array of test cases, each test case an array consisting of:
- An array of identifiers for the site alerts that should be created at the start of the test.
- An array of identifiers for the site alerts that are expected to be returned by the method under test.
See also
testGetActiveAlerts()
File
- tests/
src/ Kernel/ GetAlertsTest.php, line 104
Class
- GetAlertsTest
- Tests retrieving of currently active alerts.
Namespace
Drupal\Tests\site_alert\KernelCode
public function getActiveAlertsProvider() {
return [
[
[],
[],
],
[
[
'unscheduled-active',
],
[
'unscheduled-active',
],
],
[
[
'unscheduled-inactive',
],
[],
],
[
[
'past-active',
],
[],
],
[
[
'past-inactive',
],
[],
],
[
[
'current-active',
],
[
'current-active',
],
],
[
[
'current-inactive',
],
[],
],
[
[
'future-active',
],
[],
],
[
[
'future-inactive',
],
[],
],
[
[
'unscheduled-active',
'present-active',
],
[
'unscheduled-active',
'present-active',
],
],
[
[
'unscheduled-inactive',
'past-active',
'past-inactive',
'future-active',
'future-inactive',
],
[],
],
[
[
'unscheduled-active',
'unscheduled-inactive',
'past-active',
'past-inactive',
'present-active',
'present-inactive',
'future-active',
'future-inactive',
],
[
'unscheduled-active',
'present-active',
],
],
[
[
'unscheduled-active',
'unscheduled-active2',
'present-active',
'present-active2',
],
[
'unscheduled-active',
'unscheduled-active2',
'present-active',
'present-active2',
],
],
[
[
'unscheduled-inactive',
'unscheduled-inactive2',
'past-active',
'past-active2',
'past-inactive',
'past-inactive2',
'present-inactive',
'present-inactive2',
'future-active',
'future-active2',
'future-inactive',
'future-inactive2',
],
[],
],
[
[
'unscheduled-active',
'unscheduled-active2',
'unscheduled-inactive',
'unscheduled-inactive2',
'past-active',
'past-active2',
'past-inactive',
'past-inactive2',
'present-active',
'present-active2',
'present-inactive',
'present-inactive2',
'future-active',
'future-active2',
'future-inactive',
'future-inactive2',
],
[
'unscheduled-active',
'unscheduled-active2',
'present-active',
'present-active2',
],
],
];
}