public function DateRestrictionsStaticMinMaxTestCase::_testIntervalLowerThanMin in Date Restrictions 7        
                          
                  
                        
File
 
   - modules/minmax/tests/date_restrictions_minmax.test, line 181
- Tests for date_restrictions_minmax.module.
Class
  
  - DateRestrictionsStaticMinMaxTestCase 
- Test "minmax" restrictions, based on static relative/fixed limits.
Code
public function _testIntervalLowerThanMin($context) {
  
  $date = $this
    ->newDateObject('now', NULL, FALSE);
  $start = array(
    'year' => $date
      ->format('Y'),
    'month' => $date
      ->format('n'),
    'day' => $date
      ->format('d'),
  );
  $this
    ->postNode($context['field_name'], $context['field_type'], $context['widget_type'], $start);
  interval_apply_interval($date, $context['restrictions']['min']['interval']);
  $message = t('Dates before @date are not allowed', array(
    '@date' => $date
      ->format($this->date_input_format),
  ));
  $this
    ->assertText($message, 'Dates before min interval are not allowed (static).');
}