/** * @expectedException Ucc\Exception\Data\InvalidDataValueException * @expectedExceptionMessage value length must be less than or */ public function testCheckWithMaxRequirementsFail() { $expected = 'foo'; $requirements = array('max' => 2); $actual = StringType::check($expected, $requirements); }
/** * Checks if value is a string * * @param mixed $value Value to evaluate * @param array $requirements Array of constraints (OPTIONAL) * @return integer Cleared value * @throws InvalidDataException If the value is not integer or fails constraints checks */ public static function checkString($value, array $requirements = array()) { return StringType::check($value, $requirements); }