@@ 75-96 (lines=22) @@ | ||
72 | $this->extension->load(array($config), $container); |
|
73 | } |
|
74 | ||
75 | public function testConfigLoadNginx() |
|
76 | { |
|
77 | $container = $this->createContainer(); |
|
78 | $this->extension->load(array( |
|
79 | array( |
|
80 | 'proxy_client' => array( |
|
81 | 'nginx' => array( |
|
82 | 'base_url' => 'my_hostname', |
|
83 | 'servers' => array( |
|
84 | '127.0.0.1', |
|
85 | ), |
|
86 | ), |
|
87 | ), |
|
88 | ), |
|
89 | ), $container); |
|
90 | ||
91 | $this->assertFalse($container->hasDefinition('fos_http_cache.proxy_client.varnish')); |
|
92 | $this->assertTrue($container->hasDefinition('fos_http_cache.proxy_client.nginx')); |
|
93 | $this->assertTrue($container->hasAlias('fos_http_cache.default_proxy_client')); |
|
94 | $this->assertTrue($container->hasDefinition('fos_http_cache.event_listener.invalidation')); |
|
95 | $this->assertFalse($container->hasDefinition('fos_http_cache.handler.tag_handler')); |
|
96 | } |
|
97 | ||
98 | public function testConfigLoadSymfony() |
|
99 | { |
|
@@ 98-120 (lines=23) @@ | ||
95 | $this->assertFalse($container->hasDefinition('fos_http_cache.handler.tag_handler')); |
|
96 | } |
|
97 | ||
98 | public function testConfigLoadSymfony() |
|
99 | { |
|
100 | $container = $this->createContainer(); |
|
101 | $this->extension->load(array( |
|
102 | array( |
|
103 | 'proxy_client' => array( |
|
104 | 'symfony' => array( |
|
105 | 'base_url' => 'my_hostname', |
|
106 | 'servers' => array( |
|
107 | '127.0.0.1', |
|
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.handler.tag_handler')); |
|
120 | } |
|
121 | ||
122 | public function testEmptyConfig() |
|
123 | { |