respect-validation/tests/integration/not_without_recursion.phpt
2015-10-23 09:00:31 -02:00

20 lines
447 B
PHP

--TEST--
not() with recursion should update mode from related rules
--FILE--
<?php
require 'vendor/autoload.php';
use Respect\Validation\Exceptions\ValidationException;
use Respect\Validation\Validator;
try {
$validator = Validator::not(
Validator::intVal()->positive()
);
$validator->check(2);
} catch (ValidationException $exception) {
echo $exception->getMainMessage().PHP_EOL;
}
?>
--EXPECTF--
2 must not be positive