[Validator] Added tests for AssertTypeValidator
This commit is contained in:
parent
a305f9b25a
commit
fea37a3e95
@ -30,6 +30,16 @@ class AssertTypeValidatorTest extends \PHPUnit_Framework_TestCase
|
||||
$this->assertTrue($this->validator->isValid(null, new AssertType(array('type' => 'integer'))));
|
||||
}
|
||||
|
||||
public function testEmptyIsValidIfString()
|
||||
{
|
||||
$this->assertTrue($this->validator->isValid('', new AssertType(array('type' => 'string'))));
|
||||
}
|
||||
|
||||
public function testEmptyIsInvalidIfNoString()
|
||||
{
|
||||
$this->assertFalse($this->validator->isValid('', new AssertType(array('type' => 'integer'))));
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider getValidValues
|
||||
*/
|
||||
|
Reference in New Issue
Block a user