File tree Expand file tree Collapse file tree 6 files changed +22
-2
lines changed
tests/Unit/DependencyInjection Expand file tree Collapse file tree 6 files changed +22
-2
lines changed Original file line number Diff line number Diff line change 21
21
- php-version : ' 7.4'
22
22
- php-version : ' 8.0'
23
23
- php-version : ' 8.1'
24
+ dependencies : ' jean-beru/fos-http-cache-cloudfront'
24
25
- php-version : ' 7.4'
25
26
symfony-version : ' 4.*'
26
27
- php-version : ' 7.4'
Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ autoconfigured
6
6
backend
7
7
cacheable
8
8
cloudflare
9
+ cloudfront
9
10
ETag
10
11
friendsofsymfony
11
12
github
Original file line number Diff line number Diff line change 50
50
"symfony/monolog-bundle" : " ^3.0" ,
51
51
"symfony/routing" : " ^4.4 || ^5.0 || ^6.0" ,
52
52
"matthiasnoback/symfony-dependency-injection-test" : " ^4.0" ,
53
- "sebastian/exporter" : " ^2.0" ,
54
- "jean-beru/fos-http-cache-cloudfront" : " ^1.0"
53
+ "sebastian/exporter" : " ^2.0"
55
54
},
56
55
"suggest" : {
57
56
"jean-beru/fos-http-cache-cloudfront" : " To use CloudFront proxy" ,
Original file line number Diff line number Diff line change 13
13
14
14
use FOS \HttpCacheBundle \DependencyInjection \Configuration ;
15
15
use FOS \HttpCacheBundle \DependencyInjection \FOSHttpCacheExtension ;
16
+ use JeanBeru \HttpCacheCloudFront \Proxy \CloudFront ;
16
17
use Matthias \SymfonyDependencyInjectionTest \PhpUnit \AbstractExtensionConfigurationTestCase ;
17
18
use Symfony \Component \Config \Definition \ConfigurationInterface ;
18
19
use Symfony \Component \Config \Definition \Exception \InvalidConfigurationException ;
@@ -329,6 +330,10 @@ public function testSupportsCloudflare()
329
330
330
331
public function testSupportsCloudfront ()
331
332
{
333
+ if (!class_exists (CloudFront::class)) {
334
+ $ this ->markTestSkipped ('jean-beru/fos-http-cache-cloudfront not available ' );
335
+ }
336
+
332
337
$ expectedConfiguration = $ this ->getEmptyConfig ();
333
338
$ expectedConfiguration ['proxy_client ' ] = [
334
339
'cloudfront ' => [
@@ -357,6 +362,10 @@ public function testSupportsCloudfront()
357
362
358
363
public function testCloudfrontConfigurationWithClientIsNotAllowed ()
359
364
{
365
+ if (!class_exists (CloudFront::class)) {
366
+ $ this ->markTestSkipped ('jean-beru/fos-http-cache-cloudfront not available ' );
367
+ }
368
+
360
369
$ this ->expectException (InvalidConfigurationException::class);
361
370
$ this ->expectExceptionMessage ('You can not set both cloudfront.client and cloudfront.configuration ' );
362
371
Original file line number Diff line number Diff line change 13
13
14
14
use FOS \HttpCache \SymfonyCache \KernelDispatcher ;
15
15
use FOS \HttpCacheBundle \DependencyInjection \FOSHttpCacheExtension ;
16
+ use JeanBeru \HttpCacheCloudFront \Proxy \CloudFront ;
16
17
use Mockery \Adapter \Phpunit \MockeryPHPUnitIntegration ;
17
18
use PHPUnit \Framework \TestCase ;
18
19
use Symfony \Component \Config \Definition \Exception \InvalidConfigurationException ;
@@ -168,6 +169,10 @@ public function testConfigLoadCloudflare()
168
169
169
170
public function testConfigLoadCloudfront ()
170
171
{
172
+ if (!class_exists (CloudFront::class)) {
173
+ $ this ->markTestSkipped ('jean-beru/fos-http-cache-cloudfront not available ' );
174
+ }
175
+
171
176
$ container = $ this ->createContainer ();
172
177
$ this ->extension ->load ([
173
178
[
@@ -190,6 +195,10 @@ public function testConfigLoadCloudfront()
190
195
191
196
public function testConfigLoadCloudfrontWithClient ()
192
197
{
198
+ if (!class_exists (CloudFront::class)) {
199
+ $ this ->markTestSkipped ('jean-beru/fos-http-cache-cloudfront not available ' );
200
+ }
201
+
193
202
$ container = $ this ->createContainer ();
194
203
$ this ->extension ->load ([
195
204
[
You can’t perform that action at this time.
0 commit comments