tao-test/app/vendor/respect/validation/tests/integration/issue-1033.phpt

28 lines
630 B
Plaintext
Raw Normal View History

2022-08-29 20:14:13 +02:00
--DESCRIPTION--
The previous output was:
- All of the required rules must pass for `{ "A", "B", "B" }`
- Each item in `{ "A", "B", "B" }` must be valid
- "A" must equal 1
- "B" must equal 1
- "B" must equal 1
--FILE--
<?php
require 'vendor/autoload.php';
use Respect\Validation\Exceptions\AllOfException;
use Respect\Validation\Validator as v;
try {
v::each(v::equals(1))->assert(['A', 'B', 'B']);
} catch (AllOfException $exception) {
echo $exception->getFullMessage().PHP_EOL;
}
?>
--EXPECTF--
- Each item in { "A", "B", "B" } must be valid
- "A" must be equals 1
- "B" must be equals 1
- "B" must be equals 1