public function DateRecurFieldItemTest::testTimeZoneInvalid in Recurring Dates Field 8.2
Same name and namespace in other branches
- 3.x tests/src/Kernel/DateRecurFieldItemTest.php \Drupal\Tests\date_recur\Kernel\DateRecurFieldItemTest::testTimeZoneInvalid()
- 3.0.x tests/src/Kernel/DateRecurFieldItemTest.php \Drupal\Tests\date_recur\Kernel\DateRecurFieldItemTest::testTimeZoneInvalid()
- 3.1.x tests/src/Kernel/DateRecurFieldItemTest.php \Drupal\Tests\date_recur\Kernel\DateRecurFieldItemTest::testTimeZoneInvalid()
Test exception thrown for invalid time zones when getting a item helper.
File
- tests/
src/ Kernel/ DateRecurFieldItemTest.php, line 233
Class
- DateRecurFieldItemTest
- Tests date_recur field.
Namespace
Drupal\Tests\date_recur\KernelCode
public function testTimeZoneInvalid() {
$entity = DrEntityTest::create();
$entity->dr = [
[
'value' => '2008-06-16T00:00:00',
'end_value' => '2008-06-16T06:00:00',
'rrule' => 'FREQ=DAILY;COUNT=100',
'timezone' => 'Mars/Mariner',
],
];
$this
->setExpectedException(DateRecurHelperArgumentException::class, 'Invalid time zone');
$entity->dr[0]
->getHelper();
}