You are here

public function DateRecurModularOscarTest::testTimesEndEqualStart in Recurring Date Field Modular Widgets 8

Same name and namespace in other branches
  1. 3.x tests/src/Functional/DateRecurModularOscarTest.php \Drupal\Tests\date_recur_modular\Functional\DateRecurModularOscarTest::testTimesEndEqualStart()
  2. 2.x tests/src/Functional/DateRecurModularOscarTest.php \Drupal\Tests\date_recur_modular\Functional\DateRecurModularOscarTest::testTimesEndEqualStart()

Tests times fields end same as start.

File

tests/src/Functional/DateRecurModularOscarTest.php, line 402

Class

DateRecurModularOscarTest
Tests Oscar Widget.

Namespace

Drupal\Tests\date_recur_modular\Functional

Code

public function testTimesEndEqualStart() : void {
  $entity = DrEntityTest::create();
  $entity
    ->save();
  $edit = [
    'dr[0][mode]' => 'weekly',
    'dr[0][day_start]' => '04/14/2015',
    'dr[0][times][time_start]' => '09:00:00am',
    'dr[0][times][time_end]' => '09:00:00am',
    'dr[0][weekdays][MO]' => TRUE,
  ];
  $this
    ->drupalPostForm($entity
    ->toUrl('edit-form'), $edit, 'Save');
  $this
    ->assertSession()
    ->pageTextContains('has been updated.');
}