respect-validation/tests/integration/rules/arrayVal_5.phpt
2015-10-22 03:22:58 -02:00

16 lines
361 B
PHP

--FILE--
<?php
require 'vendor/autoload.php';
use Respect\Validation\Exceptions\AllOfException;
use Respect\Validation\Validator as v;
try {
v::not(v::arrayVal())->assert(new ArrayObject([2, 3]));
} catch (AllOfException $exception) {
echo $exception->getFullMessage();
}
?>
--EXPECTF--
- `[traversable] (ArrayObject: { 2, 3 })` must not be an array