You are here

public function DateRecurModularOscarTest::testTimesEndAfterStart 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::testTimesEndAfterStart()
  2. 2.x tests/src/Functional/DateRecurModularOscarTest.php \Drupal\Tests\date_recur_modular\Functional\DateRecurModularOscarTest::testTimesEndAfterStart()

Tests times fields end after start.

File

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

Class

DateRecurModularOscarTest
Tests Oscar Widget.

Namespace

Drupal\Tests\date_recur_modular\Functional

Code

public function testTimesEndAfterStart() : 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]' => '10:00:00am',
    'dr[0][weekdays][MO]' => TRUE,
  ];
  $this
    ->drupalPostForm($entity
    ->toUrl('edit-form'), $edit, 'Save');
  $this
    ->assertSession()
    ->pageTextContains('has been updated.');
}