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

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

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