JBZoo\PHPUnit\PerformanceTest::testSlugCache PHP Метод

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

public testSlugCache ( )
    public function testSlugCache()
    {
        $_this = $this;
        runBench(array('Str::slug(2, false)' => function () use($_this) {
            return Str::slug($_this->getRandomString(2), false);
        }, 'Str::slug(2, true)' => function () use($_this) {
            return Str::slug($_this->getRandomString(2), true);
        }, 'Slug::filter(2)' => function () use($_this) {
            return Slug::filter($_this->getRandomString(2));
        }, 'Str::slug(3, false)' => function () use($_this) {
            return Str::slug($_this->getRandomString(3), false);
        }, 'Str::slug(3, true)' => function () use($_this) {
            return Str::slug($_this->getRandomString(3), true);
        }, 'Slug::filter(3)' => function () use($_this) {
            return Slug::filter($_this->getRandomString(3));
        }, 'Str::slug(4, false)' => function () use($_this) {
            return Str::slug($_this->getRandomString(4), false);
        }, 'Str::slug(4, true)' => function () use($_this) {
            return Str::slug($_this->getRandomString(4), true);
        }, 'Slug::filter(4)' => function () use($_this) {
            return Slug::filter($_this->getRandomString(4));
        }), array('count' => 1000, 'name' => 'Random slug'));
    }