You are here

public function DateTimePlusTest::providerTestInvalidDateDiff in Drupal 9

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Component/Datetime/DateTimePlusTest.php \Drupal\Tests\Component\Datetime\DateTimePlusTest::providerTestInvalidDateDiff()
  2. 10 core/tests/Drupal/Tests/Component/Datetime/DateTimePlusTest.php \Drupal\Tests\Component\Datetime\DateTimePlusTest::providerTestInvalidDateDiff()

Provides data for date tests.

Return value

array An array of arrays, each containing the input parameters for DateTimePlusTest::testInvalidDateDiff().

See also

DateTimePlusTest::testInvalidDateDiff()

File

core/tests/Drupal/Tests/Component/Datetime/DateTimePlusTest.php, line 726

Class

DateTimePlusTest
@coversDefaultClass \Drupal\Component\Datetime\DateTimePlus @group Datetime

Namespace

Drupal\Tests\Component\Datetime

Code

public function providerTestInvalidDateDiff() {
  return [
    [
      'input1' => DateTimePlus::createFromFormat('U', 3600),
      'input2' => '1970-01-01 00:00:00',
      'absolute' => FALSE,
    ],
    [
      'input1' => DateTimePlus::createFromFormat('U', 3600),
      'input2' => NULL,
      'absolute' => FALSE,
    ],
  ];
}