public function DateRecurModularOscarTest::testTimesEndBeforeStart in Recurring Date Field Modular Widgets 8
Same name and namespace in other branches
- 3.x tests/src/Functional/DateRecurModularOscarTest.php \Drupal\Tests\date_recur_modular\Functional\DateRecurModularOscarTest::testTimesEndBeforeStart()
- 2.x tests/src/Functional/DateRecurModularOscarTest.php \Drupal\Tests\date_recur_modular\Functional\DateRecurModularOscarTest::testTimesEndBeforeStart()
Tests times fields end before start.
File
- tests/
src/ Functional/ DateRecurModularOscarTest.php, line 384
Class
- DateRecurModularOscarTest
- Tests Oscar Widget.
Namespace
Drupal\Tests\date_recur_modular\FunctionalCode
public function testTimesEndBeforeStart() : 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]' => '08:00:00am',
'dr[0][weekdays][MO]' => TRUE,
];
$this
->drupalPostForm($entity
->toUrl('edit-form'), $edit, 'Save');
$this
->assertSession()
->pageTextContains('End time must be after start time.');
}