respect-validation/tests/feature/SerializableTest.php
Alexandre Gomes Gaigalas 47f8f82d7f Remove mathematical, niche and deprecated validators
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.
2026-01-30 16:08:27 +00:00

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;
}
})());