luyatests\core\web\CompositionTest::testMultiDomainMapping PHP Method

testMultiDomainMapping() public method

    public function testMultiDomainMapping()
    {
        $request = new Request();
        $request->pathInfo = 'foo/bar';
        $request->hostInfo = 'example.fr';
        $composition = new \luya\web\Composition($request, ['hostInfoMapping' => ['example.fr' => ['langShortCode' => 'fr', 'x' => 'y']]]);
        $resolv = $composition->getResolvedPathInfo($request);
        $this->assertEquals('fr', $resolv['compositionKeys']['langShortCode']);
        $this->assertTrue(isset($resolv['compositionKeys']['x']));
    }