add more tests

This commit is contained in:
notona 2017-02-20 12:28:16 +09:00
parent 7c990e39ef
commit bc035a4a95

View File

@ -139,6 +139,14 @@ class ValidateTest extends BaseTestCase
$this->assertFalse($v->validate()); $this->assertFalse($v->validate());
} }
public function testIntegerWithMaxValidation()
{
$v = new Validator(array('num' => '4212341569'));
$v->rule('integer', 'num');
$v->rule('max', 'num', 1000);
$this->assertFalse($v->validate());
}
public function testLengthValid() public function testLengthValid()
{ {
$v = new Validator(array('str' => 'happy')); $v = new Validator(array('str' => 'happy'));