* * For the full copyright and license information, please view the "LICENSE.md" * file that was distributed with this source code. */ declare(strict_types=1); namespace Respect\Validation\Rules; use Respect\Validation\Test\RuleTestCase; /** * @group rule * * @covers \Respect\Validation\Rules\IntVal * * @author Alexandre Gomes Gaigalas * @author Danilo Benevides * @author Gabriel Caruso * @author Henrique Moody */ final class IntValTest extends RuleTestCase { /** * {@inheritdoc} */ public function providerForValidInput(): array { $rule = new IntVal(); return [ [$rule, 16], [$rule, '165'], [$rule, 123456], [$rule, PHP_INT_MAX], [$rule, '06'], [$rule, '0'], ]; } /** * {@inheritdoc} */ public function providerForInvalidInput(): array { $rule = new IntVal(); return [ [$rule, ''], [$rule, null], [$rule, 'a'], [$rule, '1.0'], [$rule, 1.0], [$rule, ' '], [$rule, true], [$rule, false], [$rule, 'Foo'], [$rule, '1.44'], [$rule, 1e-5], ]; } }