You are here

public function DateRestrictionsStaticMinMaxTestCase::_testDateWithinLimits in Date Restrictions 7

File

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

Class

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

Code

public function _testDateWithinLimits($context) {
  $year = date('Y');
  $start = array(
    'year' => $year,
    'month' => 4,
    'day' => 12,
  );
  $edit = $this
    ->postNode($context['field_name'], $context['field_type'], $context['widget_type'], $start);
  $this
    ->assertText($edit['title'], 'Date is within minmax fixed limits (static).');
}