Phalcon\Test\Unit\Text\TextRandomTest::testRandomHexDec PHP Метод

testRandomHexDec() публичный Метод

Tests the random function with hexdec
С версии: 2014-09-29
Автор: Nikolaos Dimopoulos ([email protected])
public testRandomHexDec ( )
    public function testRandomHexDec()
    {
        $this->specify("random with hexdec does not return correct results", function () {
            for ($i = 1; $i < 10; $i++) {
                $source = Text::random(Text::RANDOM_HEXDEC, $i);
                expect(preg_match('/[a-f0-9]+/', $source, $matches))->equals(1);
                expect($matches[0])->equals($source);
                expect(strlen($source))->equals($i);
            }
        });
    }