luyatests\core\web\UrlManagerTest::testOriginalCreateAbsoluteUrl PHP Method

testOriginalCreateAbsoluteUrl() public method

    public function testOriginalCreateAbsoluteUrl()
    {
        $urlManager = Yii::$app->urlManager;
        Yii::$app->request->baseUrl = '';
        Yii::$app->request->scriptUrl = '';
        $this->assertEquals('http://localhost/en/urlmodule/bar', $urlManager->createAbsoluteUrl(['urlmodule/bar/index']));
        $this->assertEquals('http://localhost/en/module/not/found', $urlManager->createAbsoluteUrl(['module/not/found']));
        $this->assertEquals('http://localhost/en/urlmodule', $urlManager->createAbsoluteUrl(['urlmodule/default/index']));
        Yii::$app->composition->hidden = true;
        $this->assertEquals('http://localhost/urlmodule/bar', $urlManager->createAbsoluteUrl(['urlmodule/bar/index']));
        $this->assertEquals('http://localhost/module/not/found', $urlManager->createAbsoluteUrl(['module/not/found']));
        $this->assertEquals('http://localhost/urlmodule', $urlManager->createAbsoluteUrl(['urlmodule/default/index']));
    }