2018-11-30 09:25:42 +01:00
|
|
|
--CREDITS--
|
|
|
|
Henrique Moody <henriquemoody@gmail.com>
|
2015-10-08 07:39:17 +02:00
|
|
|
--TEST--
|
2018-08-02 11:13:48 +02:00
|
|
|
not() with recursion should update mode of its children
|
2015-10-08 07:39:17 +02:00
|
|
|
--FILE--
|
|
|
|
<?php
|
2019-02-09 11:44:33 +01:00
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
2015-10-08 07:39:17 +02:00
|
|
|
require 'vendor/autoload.php';
|
|
|
|
|
2015-10-23 12:46:12 +02:00
|
|
|
use Respect\Validation\Exceptions\ValidationException;
|
2015-10-18 03:44:47 +02:00
|
|
|
use Respect\Validation\Validator;
|
2015-10-08 07:39:17 +02:00
|
|
|
|
|
|
|
try {
|
|
|
|
$validator = Validator::not(
|
|
|
|
Validator::intVal()->positive()
|
|
|
|
);
|
|
|
|
$validator->check(2);
|
2015-10-23 12:46:12 +02:00
|
|
|
} catch (ValidationException $exception) {
|
2020-07-21 22:54:41 +02:00
|
|
|
echo $exception->getMessage() . PHP_EOL;
|
2015-10-08 07:39:17 +02:00
|
|
|
}
|
|
|
|
?>
|
2018-12-19 18:05:58 +01:00
|
|
|
--EXPECT--
|
2015-10-08 07:39:17 +02:00
|
|
|
2 must not be positive
|