public function DateRecurFieldItemTest::testNonInfinite in Recurring Dates Field 3.1.x
Same name and namespace in other branches
- 8.2 tests/src/Kernel/DateRecurFieldItemTest.php \Drupal\Tests\date_recur\Kernel\DateRecurFieldItemTest::testNonInfinite()
- 3.x tests/src/Kernel/DateRecurFieldItemTest.php \Drupal\Tests\date_recur\Kernel\DateRecurFieldItemTest::testNonInfinite()
- 3.0.x tests/src/Kernel/DateRecurFieldItemTest.php \Drupal\Tests\date_recur\Kernel\DateRecurFieldItemTest::testNonInfinite()
Tests infinite flag is set if an non-infinite RRULE is set.
File
- tests/
src/ Kernel/ DateRecurFieldItemTest.php, line 62
Class
- DateRecurFieldItemTest
- Tests date_recur field.
Namespace
Drupal\Tests\date_recur\KernelCode
public function testNonInfinite() {
$entity = DrEntityTest::create();
$entity->dr = [
[
'value' => '2008-06-16T00:00:00',
'end_value' => '2008-06-16T06:00:00',
'rrule' => 'FREQ=DAILY;COUNT=100',
'timezone' => 'Australia/Sydney',
],
];
$entity
->save();
$this
->assertTrue($entity->dr[0]->infinite === FALSE);
}