Exemplo n.º 1
0
 /**
  * @param \Yosmanyga\Validation\Resource\Definition\ExpressionDefinition $definition
  *
  * @return \Yosmanyga\Validation\Validator\ExceptionValidator
  */
 protected function createValidator($definition)
 {
     return new ExceptionValidator($definition->createValidator());
 }
 public function testCreateValidator()
 {
     $definition = new ExpressionDefinition();
     $this->assertInstanceOf('\\Yosmanyga\\Validation\\Validator\\ObjectValidator', $definition->createValidator());
 }
Exemplo n.º 3
0
 /**
  * @param array $data
  *
  * @return \Yosmanyga\Validation\Resource\Definition\ExpressionDefinition
  */
 protected function createDefinition($data)
 {
     $definition = new ExpressionDefinition();
     $definition->import($data);
     return $definition;
 }