You are here

public function DateHelperTest::providerTestWeekDaysOrdered in Drupal 9

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Core/Datetime/DateHelperTest.php \Drupal\Tests\Core\Datetime\DateHelperTest::providerTestWeekDaysOrdered()

File

core/tests/Drupal/Tests/Core/Datetime/DateHelperTest.php, line 30

Class

DateHelperTest
@coversDefaultClass \Drupal\Core\Datetime\DateHelper @group Datetime

Namespace

Drupal\Tests\Core\Datetime

Code

public function providerTestWeekDaysOrdered() {
  $data = [];
  $data[] = [
    0,
    [
      0 => 'Sunday',
      1 => 'Monday',
      2 => 'Tuesday',
      3 => 'Wednesday',
      4 => 'Thursday',
      5 => 'Friday',
      6 => 'Saturday',
    ],
  ];
  $data[] = [
    1,
    [
      1 => 'Monday',
      2 => 'Tuesday',
      3 => 'Wednesday',
      4 => 'Thursday',
      5 => 'Friday',
      6 => 'Saturday',
      0 => 'Sunday',
    ],
  ];
  $data[] = [
    2,
    [
      2 => 'Tuesday',
      3 => 'Wednesday',
      4 => 'Thursday',
      5 => 'Friday',
      6 => 'Saturday',
      0 => 'Sunday',
      1 => 'Monday',
    ],
  ];
  $data[] = [
    3,
    [
      3 => 'Wednesday',
      4 => 'Thursday',
      5 => 'Friday',
      6 => 'Saturday',
      0 => 'Sunday',
      1 => 'Monday',
      2 => 'Tuesday',
    ],
  ];
  $data[] = [
    4,
    [
      4 => 'Thursday',
      5 => 'Friday',
      6 => 'Saturday',
      0 => 'Sunday',
      1 => 'Monday',
      2 => 'Tuesday',
      3 => 'Wednesday',
    ],
  ];
  $data[] = [
    5,
    [
      5 => 'Friday',
      6 => 'Saturday',
      0 => 'Sunday',
      1 => 'Monday',
      2 => 'Tuesday',
      3 => 'Wednesday',
      4 => 'Thursday',
    ],
  ];
  $data[] = [
    6,
    [
      6 => 'Saturday',
      0 => 'Sunday',
      1 => 'Monday',
      2 => 'Tuesday',
      3 => 'Wednesday',
      4 => 'Thursday',
      5 => 'Friday',
    ],
  ];
  $data[] = [
    7,
    [
      0 => 'Sunday',
      1 => 'Monday',
      2 => 'Tuesday',
      3 => 'Wednesday',
      4 => 'Thursday',
      5 => 'Friday',
      6 => 'Saturday',
    ],
  ];
  return $data;
}