Phalcon\Test\Unit\Validation\Validator\DigitTest::testShouldValidateIntOrStringOfDigits PHP Method

testShouldValidateIntOrStringOfDigits() public method

    public function testShouldValidateIntOrStringOfDigits()
    {
        $this->specify('The Digit Validator does not validate digits correctly', function ($digit) {
            $validation = new Validation();
            $validation->add('amount', new Digit());
            $messages = $validation->validate(['amount' => $digit]);
            expect($messages)->count(0);
        }, ['examples' => [['123'], [123], [PHP_INT_MAX], [0xffffff], [100000], [-100000], [0], ["0"], ["00001233422003400"]]]);
    }