eZ\Publish\Core\MVC\Symfony\SiteAccess\Tests\RouterTest::testMatchWithEnv PHP Метод

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

public testMatchWithEnv ( Router $router )
$router eZ\Publish\Core\MVC\Symfony\SiteAccess\Router
    public function testMatchWithEnv(Router $router)
    {
        $saName = 'first_sa';
        putenv("EZPUBLISH_SITEACCESS={$saName}");
        $sa = $router->match(new SimplifiedRequest());
        $this->assertInstanceOf('eZ\\Publish\\Core\\MVC\\Symfony\\SiteAccess', $sa);
        $this->assertSame($saName, $sa->name);
        $this->assertSame('env', $sa->matchingType);
        $router->setSiteAccess();
    }