Skip to content

Commit 6eab39f

Browse files
author
Till Hildebrandt
committed
Wrapped php-http/cache-plugin Cache Listeners
- fixed tests, extended by cache_listeners
1 parent 24d8740 commit 6eab39f

File tree

4 files changed

+7
-1
lines changed

4 files changed

+7
-1
lines changed

tests/Resources/Fixtures/config/full.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@
102102
'methods' => ['GET'],
103103
'cache_key_generator' => null,
104104
'respect_response_cache_directives' => ['X-Foo'],
105+
'cache_listeners' => null,
105106
],
106107
],
107108
'cookie' => [

tests/Resources/Fixtures/config/full.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
<my_service type="service" service="my_auth_service"/>
5555
</authentication>
5656
<cache cache-pool="my_cache_pool" stream-factory="my_other_stream_factory">
57-
<config default-ttl="42" cache-lifetime="2592000" hash-algo="sha1" cache-key-generator="null">
57+
<config default-ttl="42" cache-lifetime="2592000" hash-algo="sha1" cache-key-generator="null" cache-listeners="null">
5858
<respect-response-cache-directive>X-Foo</respect-response-cache-directive>
5959
<method>GET</method>
6060
</config>

tests/Resources/Fixtures/config/full.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ httplug:
7373
cache_key_generator: null
7474
respect_response_cache_directives:
7575
- X-Foo
76+
cache_listeners: null
7677
cookie:
7778
cookie_jar: my_cookie_jar
7879
decoder:

tests/Unit/DependencyInjection/ConfigurationTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ class ConfigurationTest extends AbstractExtensionConfigurationTestCase
4343
'stream_factory' => 'httplug.stream_factory',
4444
'config' => [
4545
'methods' => ['GET', 'HEAD'],
46+
'cache_listeners' => []
4647
],
4748
],
4849
'cookie' => [
@@ -233,6 +234,7 @@ public function testSupportsAllConfigFormats(): void
233234
'methods' => ['GET'],
234235
'cache_key_generator' => null,
235236
'respect_response_cache_directives' => ['X-Foo'],
237+
'cache_listeners' => [],
236238
],
237239
],
238240
'cookie' => [
@@ -354,6 +356,7 @@ public function testCacheConfigDeprecationCompatibility(): void
354356
'config' => [
355357
'methods' => ['GET', 'HEAD'],
356358
'respect_cache_headers' => true,
359+
'cache_listeners' => [],
357360
],
358361
]);
359362
$this->assertProcessedConfigurationEquals($config, [$file]);
@@ -372,6 +375,7 @@ public function testCacheConfigDeprecationCompatibilityIssue166(): void
372375
'config' => [
373376
'methods' => ['GET', 'HEAD'],
374377
'respect_cache_headers' => false,
378+
'cache_listeners' => [],
375379
],
376380
]);
377381
$this->assertProcessedConfigurationEquals($config, [$file]);

0 commit comments

Comments
 (0)