* * 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\FloatVal * * @author Alexandre Gomes Gaigalas * @author Danilo Benevides * @author Gabriel Caruso * @author Henrique Moody */ final class FloatValTest extends RuleTestCase { /* * {@inheritdoc} */ public function providerForValidInput(): array { $rule = new FloatVal(); return [ [$rule, 165], [$rule, 1], [$rule, 0], [$rule, 0.0], [$rule, '1'], [$rule, '19347e12'], [$rule, 165.0], [$rule, '165.7'], [$rule, 1e12], ]; } /* * {@inheritdoc} */ public function providerForInvalidInput(): array { $rule = new FloatVal(); return [ [$rule, ''], [$rule, null], [$rule, 'a'], [$rule, ' '], [$rule, 'Foo'], ]; } }