lithium\tests\cases\net\http\RouterTest::testMatchWithAbsoluteAndNoSchemeAttachment PHP Метод

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

    public function testMatchWithAbsoluteAndNoSchemeAttachment()
    {
        Router::attach('tests', array('absolute' => true, 'host' => 'tests.mysite.com', 'scheme' => null));
        Router::scope('tests');
        $result = Router::match('/controller/action/hello');
        $this->assertIdentical('http://tests.mysite.com/controller/action/hello', $result);
        Router::attach('tests', array('absolute' => true, 'host' => 'tests.mysite.com', 'scheme' => false));
        Router::scope('tests');
        $result = Router::match('/controller/action/hello');
        $this->assertIdentical('//tests.mysite.com/controller/action/hello', $result);
    }
RouterTest