You are here

public function TimeTest::providerConvertWordToTime in Node Revision Delete 8

Data provider for testConvertWordToTime().

Return value

array An array of arrays, each containing:

See also

testConvertWordToTime()

File

tests/src/Unit/Utility/TimeTest.php, line 42

Class

TimeTest
Tests the Time class methods.

Namespace

Drupal\Tests\node_revision_delete\Unit\Utility

Code

public function providerConvertWordToTime() {
  $all_values = [
    'never' => '-1',
    'every_time' => '0',
    'every_hour' => '3600',
    'everyday' => '86400',
    'every_week' => '604800',
    'every_10_days' => '864000',
    'every_15_days' => '1296000',
    'every_month' => '2592000',
    'every_3_months' => '7776000',
    'every_6_months' => '15552000',
    'every_year' => '31536000',
    'every_2_years' => '63072000',
  ];
  $tests[] = [
    $all_values,
    NULL,
  ];
  $tests[] = [
    $all_values['never'],
    'never',
  ];
  $tests[] = [
    $all_values['every_time'],
    'every_time',
  ];
  $tests[] = [
    $all_values['every_hour'],
    'every_hour',
  ];
  $tests[] = [
    $all_values['everyday'],
    'everyday',
  ];
  $tests[] = [
    $all_values['every_week'],
    'every_week',
  ];
  $tests[] = [
    $all_values['every_10_days'],
    'every_10_days',
  ];
  $tests[] = [
    $all_values['every_15_days'],
    'every_15_days',
  ];
  $tests[] = [
    $all_values['every_month'],
    'every_month',
  ];
  $tests[] = [
    $all_values['every_3_months'],
    'every_3_months',
  ];
  $tests[] = [
    $all_values['every_6_months'],
    'every_6_months',
  ];
  $tests[] = [
    $all_values['every_year'],
    'every_year',
  ];
  $tests[] = [
    $all_values['every_2_years'],
    'every_2_years',
  ];
  return $tests;
}