コード例 #1
0
ファイル: DateStepTest.php プロジェクト: haoyanfei/zf2
 public function testGetMessagesReturnsDefaultValue()
 {
     $validator = new Validator\DateStep();
     $this->assertEquals(array(), $validator->getMessages());
 }
コード例 #2
0
ファイル: DateStepTest.php プロジェクト: pnaq57/zf2demo
 public function testStepError()
 {
     $validator = new Validator\DateStep(array('format' => 'Y-m-d', 'baseValue' => '2012-01-23', 'step' => new DateInterval("P10D")));
     $this->assertFalse($validator->isValid('2012-02-23'));
 }