@@ 71-94 (lines=24) @@ | ||
68 | $this->extension->load(array($config), $container); |
|
69 | } |
|
70 | ||
71 | public function testConfigLoadNginx() |
|
72 | { |
|
73 | $container = $this->createContainer(); |
|
74 | $this->extension->load(array( |
|
75 | array( |
|
76 | 'proxy_client' => array( |
|
77 | 'nginx' => array( |
|
78 | 'http' => [ |
|
79 | 'base_url' => 'my_hostname', |
|
80 | 'servers' => array( |
|
81 | '127.0.0.1', |
|
82 | ), |
|
83 | ], |
|
84 | ), |
|
85 | ), |
|
86 | ), |
|
87 | ), $container); |
|
88 | ||
89 | $this->assertFalse($container->hasDefinition('fos_http_cache.proxy_client.varnish')); |
|
90 | $this->assertTrue($container->hasDefinition('fos_http_cache.proxy_client.nginx')); |
|
91 | $this->assertTrue($container->hasAlias('fos_http_cache.default_proxy_client')); |
|
92 | $this->assertTrue($container->hasDefinition('fos_http_cache.event_listener.invalidation')); |
|
93 | $this->assertFalse($container->hasDefinition('fos_http_cache.http.symfony_response_tagger')); |
|
94 | } |
|
95 | ||
96 | public function testConfigLoadSymfony() |
|
97 | { |
|
@@ 96-120 (lines=25) @@ | ||
93 | $this->assertFalse($container->hasDefinition('fos_http_cache.http.symfony_response_tagger')); |
|
94 | } |
|
95 | ||
96 | public function testConfigLoadSymfony() |
|
97 | { |
|
98 | $container = $this->createContainer(); |
|
99 | $this->extension->load(array( |
|
100 | array( |
|
101 | 'proxy_client' => array( |
|
102 | 'symfony' => array( |
|
103 | 'http' => [ |
|
104 | 'base_url' => 'my_hostname', |
|
105 | 'servers' => array( |
|
106 | '127.0.0.1', |
|
107 | ), |
|
108 | ], |
|
109 | ), |
|
110 | ), |
|
111 | ), |
|
112 | ), $container); |
|
113 | ||
114 | $this->assertFalse($container->hasDefinition('fos_http_cache.proxy_client.varnish')); |
|
115 | $this->assertFalse($container->hasDefinition('fos_http_cache.proxy_client.nginx')); |
|
116 | $this->assertTrue($container->hasDefinition('fos_http_cache.proxy_client.symfony')); |
|
117 | $this->assertTrue($container->hasAlias('fos_http_cache.default_proxy_client')); |
|
118 | $this->assertTrue($container->hasDefinition('fos_http_cache.event_listener.invalidation')); |
|
119 | $this->assertFalse($container->hasDefinition('fos_http_cache.http.symfony_response_tagger')); |
|
120 | } |
|
121 | ||
122 | public function testConfigCustomClient() |
|
123 | { |