eZ\Bundle\EzPublishCoreBundle\Tests\DependencyInjection\Compiler\HttpCachePassTest::testProcess PHP Method

testProcess() public method

public testProcess ( )
    public function testProcess()
    {
        $this->setDefinition('ezpublish.http_cache.cache_manager', new Definition('foo', array(true)));
        $varnishProxyClient = new Definition();
        $this->setDefinition('fos_http_cache.proxy_client.varnish', $varnishProxyClient);
        $this->compile();
        $factoryArray = $varnishProxyClient->getFactory();
        $this->assertInstanceOf('Symfony\\Component\\DependencyInjection\\Reference', $factoryArray[0]);
        $this->assertEquals('buildProxyClient', $factoryArray[1]);
        $this->assertEquals('ezpublish.http_cache.proxy_client.varnish.factory', $factoryArray[0]);
        $this->assertTrue($varnishProxyClient->isLazy());
        $this->assertContainerBuilderHasServiceDefinitionWithArgument('ezpublish.http_cache.cache_manager', 0, new Reference('fos_http_cache.proxy_client.varnish'));
    }