eZ\Bundle\EzPublishCoreBundle\Tests\Cache\Http\VarnishProxyClientFactoryTest::testBuildProxyClientNoDynamicSettings PHP Method

testBuildProxyClientNoDynamicSettings() public method

    public function testBuildProxyClientNoDynamicSettings()
    {
        $servers = array('http://varnish1', 'http://varnish2');
        $baseUrl = 'http://phoenix-rises.fm/rapmm';
        $this->configResolver->expects($this->never())->method('getParameter');
        $proxyClient = $this->factory->buildProxyClient($servers, $baseUrl);
        $this->assertInstanceOf($this->proxyClientClass, $proxyClient);
        $refProxy = new ReflectionObject($proxyClient);
        $refServers = $refProxy->getParentClass()->getProperty('servers');
        $refServers->setAccessible(true);
        $this->assertSame($servers, $refServers->getValue($proxyClient));
    }