* * 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\NumericVal * * @author Alexandre Gomes Gaigalas * @author Augusto Pascutti * @author Danilo Correa * @author Gabriel Caruso * @author Henrique Moody */ final class NumericValTest extends RuleTestCase { /** * {@inheritdoc} */ public function providerForValidInput(): array { $numericVal = new NumericVal(); return [ [$numericVal, 164], [$numericVal, 165.0], [$numericVal, -165], [$numericVal, '165'], [$numericVal, '165.0'], [$numericVal, '+165.0'], ]; } /** * {@inheritdoc} */ public function providerForInvalidInput(): array { $numericVal = new NumericVal(); return [ [$numericVal, ''], [$numericVal, null], [$numericVal, 'a'], [$numericVal, ' '], [$numericVal, 'Foo'], ]; } }