You are here

public function DateRestrictionsStaticMinMaxTestCase::testIntervalWithinLimits in Date Restrictions 7

Date within fixed min-max interval limits.

Test today+2 is within [today+1 today+3] interval.

File

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

Class

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

Code

public function testIntervalWithinLimits() {
  $restrictions = array(
    'min' => array(
      'type' => 'interval',
      'interval' => array(
        'interval' => 1,
        'period' => 'day',
      ),
    ),
    'max' => array(
      'type' => 'interval',
      'interval' => array(
        'interval' => 3,
        'period' => 'day',
      ),
    ),
  );
  parent::runTests($restrictions, NULL, array(
    $this,
    '_testIntervalWithinLimits',
  ));
}