You are here

public function DateTimePlusTest::testInvalidDates in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/tests/Drupal/Tests/Component/Datetime/DateTimePlusTest.php \Drupal\Tests\Component\Datetime\DateTimePlusTest::testInvalidDates()

Test invalid date handling.

@dataProvider providerTestInvalidDates @expectedException \Exception

Parameters

mixed $input: Input argument for DateTimePlus.

string $timezone: Timezone argument for DateTimePlus.

string $format: Format argument for DateTimePlus.

string $message: Message to print if no errors are thrown by the invalid dates.

File

core/tests/Drupal/Tests/Component/Datetime/DateTimePlusTest.php, line 210
Contains \Drupal\Tests\Component\Datetime\DateTimePlusTest.

Class

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

Namespace

Drupal\Tests\Component\Datetime

Code

public function testInvalidDates($input, $timezone, $format, $message) {
  DateTimePlus::createFromFormat($format, $input, $timezone);
}