mirror of
https://github.com/Respect/Validation.git
synced 2026-03-15 14:55:44 +01:00
This commit removes validators described in #1642, refactoring to clean up after their removal. - Url was refactored to use the function `filter_var` instead. - tests/bootstrap.php is no longer needed and was removed. - Updated migration guide with recommendations for replacements.
21 lines
568 B
PHP
21 lines
568 B
PHP
<?php
|
|
|
|
/*
|
|
* SPDX-License-Identifier: MIT
|
|
* SPDX-FileCopyrightText: (c) Respect Project Contributors
|
|
* SPDX-FileContributor: Alexandre Gomes Gaigalas <alganet@gmail.com>
|
|
*/
|
|
|
|
declare(strict_types=1);
|
|
|
|
use Respect\Validation\Test\SmokeTestProvider;
|
|
|
|
test('Can be serialized and unserialized', function ($validator, $input): void {
|
|
expect(
|
|
unserialize(serialize($validator))->evaluate($input)->hasPassed,
|
|
)->toBeTrue();
|
|
})->with(fn(): Generator => (new class {
|
|
use SmokeTestProvider {
|
|
provideValidatorInput as public __invoke;
|
|
}
|
|
})());
|