Mmoreram\tests\Visithor\Generator\UrlGeneratorTest::testProfileDefinedInGlobal PHP Метод

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

Test profile defined in global
    public function testProfileDefinedInGlobal()
    {
        $config = ['defaults' => ['options' => ['profile' => 'admin']], 'profiles' => ['admin' => ['param1' => 'anothervalue1', 'param2' => 'value2', 'param3' => 'value3']], 'urls' => [['/url', 200, ['param1' => 'value1']]]];
        $urls = $this->getUrlGeneratorInstance()->generate($config)->getUrls();
        /**
         * @var Url $firstUrl
         */
        $firstUrl = reset($urls);
        $this->assertEquals(['param1' => 'value1', 'param2' => 'value2', 'param3' => 'value3', 'profile' => 'admin'], $firstUrl->getOptions());
    }