public function DateRestrictionsStaticMinMaxTestCase::testDateLowerThanMin in Date Restrictions 7
Fixed min date.
Test YYYY-04-12 is not valid for YYYY-04-14 min restriction.
File
- modules/
minmax/ tests/ date_restrictions_minmax.test, line 68 - Tests for date_restrictions_minmax.module.
Class
- DateRestrictionsStaticMinMaxTestCase
- Test "minmax" restrictions, based on static relative/fixed limits.
Code
public function testDateLowerThanMin() {
$year = date('Y');
$restrictions = array(
'min' => array(
'type' => 'date',
'date' => array(
'year' => $year,
'month' => 4,
'day' => 14,
),
),
);
parent::runTests($restrictions, NULL, array(
$this,
'_testDateLowerThanMin',
));
}