You are here

public function DateRecurFieldItemTest::testInfinite in Recurring Dates Field 3.x

Same name and namespace in other branches
  1. 8.2 tests/src/Kernel/DateRecurFieldItemTest.php \Drupal\Tests\date_recur\Kernel\DateRecurFieldItemTest::testInfinite()
  2. 3.0.x tests/src/Kernel/DateRecurFieldItemTest.php \Drupal\Tests\date_recur\Kernel\DateRecurFieldItemTest::testInfinite()
  3. 3.1.x tests/src/Kernel/DateRecurFieldItemTest.php \Drupal\Tests\date_recur\Kernel\DateRecurFieldItemTest::testInfinite()

Tests infinite flag is set if an infinite RRULE is set.

File

tests/src/Kernel/DateRecurFieldItemTest.php, line 45

Class

DateRecurFieldItemTest
Tests date_recur field.

Namespace

Drupal\Tests\date_recur\Kernel

Code

public function testInfinite() {
  $entity = DrEntityTest::create();
  $entity->dr = [
    [
      'value' => '2008-06-16T00:00:00',
      'end_value' => '2008-06-16T06:00:00',
      'rrule' => 'FREQ=DAILY',
      'timezone' => 'Australia/Sydney',
    ],
  ];
  $entity
    ->save();
  $this
    ->assertTrue($entity->dr[0]->infinite === TRUE);
}