You are here

protected function DateRecurBasicFormatterTest::createRecurringEntity in Recurring Dates Field 8.2

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

Creates a recurring entity.

Return value

\Drupal\date_recur_entity_test\Entity\DrEntityTest A recurring entity.

1 call to DateRecurBasicFormatterTest::createRecurringEntity()
DateRecurBasicFormatterTest::testFormatterInterpretation in tests/src/Kernel/DateRecurBasicFormatterTest.php
Tests interpretation.

File

tests/src/Kernel/DateRecurBasicFormatterTest.php, line 486

Class

DateRecurBasicFormatterTest
Tests date recur formatter.

Namespace

Drupal\Tests\date_recur\Kernel

Code

protected function createRecurringEntity() {
  $entity = DrEntityTest::create();
  $entity->dr = [
    'value' => '2014-06-15T23:00:00',
    'end_value' => '2014-06-16T07:00:00',
    'rrule' => 'FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR',
    'infinite' => '1',
    'timezone' => 'Australia/Sydney',
  ];
  return $entity;
}