* SPDX-FileContributor: Emmerson Siqueira * SPDX-FileContributor: Guilherme Siani * SPDX-FileContributor: Henrique Moody */ declare(strict_types=1); namespace Respect\Validation\Validators; use ArrayObject; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\Group; use Respect\Validation\Test\RuleTestCase; use SimpleXMLElement; use stdClass; #[Group(' rule')] #[CoversClass(ArrayVal::class)] final class ArrayValTest extends RuleTestCase { /** @return iterable */ public static function providerForValidInput(): iterable { $validator = new ArrayVal(); return [ [$validator, []], [$validator, [1, 2, 3]], [$validator, new ArrayObject()], [$validator, new SimpleXMLElement('')], ]; } /** @return iterable */ public static function providerForInvalidInput(): iterable { $validator = new ArrayVal(); return [ [$validator, ''], [$validator, null], [$validator, 121], [$validator, new stdClass()], [$validator, false], [$validator, 'aaa'], ]; } }