You are here

public function DateRestrictionsStaticMinMaxTestCase::_testIntervalWithinLimits in Date Restrictions 7

File

modules/minmax/tests/date_restrictions_minmax.test, line 153
Tests for date_restrictions_minmax.module.

Class

DateRestrictionsStaticMinMaxTestCase
Test "minmax" restrictions, based on static relative/fixed limits.

Code

public function _testIntervalWithinLimits($context) {
  $date = $this
    ->newDateObject('now + 2 days');
  $start = array(
    'year' => $date
      ->format('Y'),
    'month' => $date
      ->format('n'),
    'day' => $date
      ->format('d'),
  );
  $edit = $this
    ->postNode($context['field_name'], $context['field_type'], $context['widget_type'], $start);
  $this
    ->assertText($edit['title'], 'Date is within minmax relative limits (static).');
}