You are here

public function DateTimePlusTest::testInvalidDateArrays 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::testInvalidDateArrays()

Test creating dates from invalid array input.

@dataProvider providerTestInvalidDateArrays @expectedException \Exception

Parameters

mixed $input: Input argument for DateTimePlus.

string $timezone: Timezone argument for DateTimePlus.

File

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

Class

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

Namespace

Drupal\Tests\Component\Datetime

Code

public function testInvalidDateArrays($input, $timezone) {
  $this
    ->assertInstanceOf('\\Drupal\\Component\\DateTimePlus', DateTimePlus::createFromArray($input, $timezone));
}