You are here

public function CliCommandsTest::createSiteAlertWithOptionsProvider in Site Alert 8

Data provider for ::testCreateSiteAlertWithOptions().

Return value

array An array of test cases, each test case an array with the following elements:

  • An optional severity.
  • An optional start time.
  • An optional end time.

File

tests/src/Kernel/CliCommandsTest.php, line 104

Class

CliCommandsTest
Tests for the site alert CLI Commands service.

Namespace

Drupal\Tests\site_alert\Kernel

Code

public function createSiteAlertWithOptionsProvider() : array {
  return [
    [
      'low',
      '2022-09-12T15:30:01',
      '2022-09-13T15:45:01',
    ],
    [
      NULL,
      '2022-09-12T15:30:01',
      '2022-09-13T15:45:01',
    ],
    [
      'medium',
      NULL,
      '2022-09-13T15:45:01',
    ],
    [
      'high',
      '2022-09-12T15:30:01',
      NULL,
    ],
    [
      NULL,
      NULL,
      '2022-09-13T15:45:01',
    ],
    [
      NULL,
      '2022-09-12T15:30:01',
      NULL,
    ],
    [
      'low',
      NULL,
      NULL,
    ],
    [
      NULL,
      NULL,
      NULL,
    ],
  ];
}