/** * @expectedException Ucc\Exception\Data\InvalidDataValueException * @expectedExceptionMessage part 2 (direction) must be one of */ public function testCheckFailWrondDirecionPart() { $supplied = array('name-wrong'); $requirements = array('fields' => array('id')); $actual = SortType::check($supplied, $requirements); }
/** * Checks if value is a Sort * * @param mixed $value Value to evaluate * @param array $requirements Array of constraints * @return array Cleared value * @throws InvalidDataException If the value is not a Sort or fails constraints checks */ public static function checkSort($value, array $requirements) { return SortType::check($value, $requirements); }