File tree Expand file tree Collapse file tree
tests/Unit/DependencyInjection Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2121 - php-version : ' 7.4'
2222 - php-version : ' 8.0'
2323 - php-version : ' 8.1'
24+ dependencies : ' jean-beru/fos-http-cache-cloudfront'
2425 - php-version : ' 7.4'
2526 symfony-version : ' 4.*'
2627 - php-version : ' 7.4'
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ autoconfigured
66backend
77cacheable
88cloudflare
9+ cloudfront
910ETag
1011friendsofsymfony
1112github
Original file line number Diff line number Diff line change 5050 "symfony/monolog-bundle" : " ^3.0" ,
5151 "symfony/routing" : " ^4.4 || ^5.0 || ^6.0" ,
5252 "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"
5554 },
5655 "suggest" : {
5756 "jean-beru/fos-http-cache-cloudfront" : " To use CloudFront proxy" ,
Original file line number Diff line number Diff line change 1313
1414use FOS \HttpCacheBundle \DependencyInjection \Configuration ;
1515use FOS \HttpCacheBundle \DependencyInjection \FOSHttpCacheExtension ;
16+ use JeanBeru \HttpCacheCloudFront \Proxy \CloudFront ;
1617use Matthias \SymfonyDependencyInjectionTest \PhpUnit \AbstractExtensionConfigurationTestCase ;
1718use Symfony \Component \Config \Definition \ConfigurationInterface ;
1819use Symfony \Component \Config \Definition \Exception \InvalidConfigurationException ;
@@ -329,6 +330,10 @@ public function testSupportsCloudflare()
329330
330331 public function testSupportsCloudfront ()
331332 {
333+ if (!class_exists (CloudFront::class)) {
334+ $ this ->markTestSkipped ('jean-beru/fos-http-cache-cloudfront not available ' );
335+ }
336+
332337 $ expectedConfiguration = $ this ->getEmptyConfig ();
333338 $ expectedConfiguration ['proxy_client ' ] = [
334339 'cloudfront ' => [
@@ -357,6 +362,10 @@ public function testSupportsCloudfront()
357362
358363 public function testCloudfrontConfigurationWithClientIsNotAllowed ()
359364 {
365+ if (!class_exists (CloudFront::class)) {
366+ $ this ->markTestSkipped ('jean-beru/fos-http-cache-cloudfront not available ' );
367+ }
368+
360369 $ this ->expectException (InvalidConfigurationException::class);
361370 $ this ->expectExceptionMessage ('You can not set both cloudfront.client and cloudfront.configuration ' );
362371
Original file line number Diff line number Diff line change 1313
1414use FOS \HttpCache \SymfonyCache \KernelDispatcher ;
1515use FOS \HttpCacheBundle \DependencyInjection \FOSHttpCacheExtension ;
16+ use JeanBeru \HttpCacheCloudFront \Proxy \CloudFront ;
1617use Mockery \Adapter \Phpunit \MockeryPHPUnitIntegration ;
1718use PHPUnit \Framework \TestCase ;
1819use Symfony \Component \Config \Definition \Exception \InvalidConfigurationException ;
@@ -168,6 +169,10 @@ public function testConfigLoadCloudflare()
168169
169170 public function testConfigLoadCloudfront ()
170171 {
172+ if (!class_exists (CloudFront::class)) {
173+ $ this ->markTestSkipped ('jean-beru/fos-http-cache-cloudfront not available ' );
174+ }
175+
171176 $ container = $ this ->createContainer ();
172177 $ this ->extension ->load ([
173178 [
@@ -190,6 +195,10 @@ public function testConfigLoadCloudfront()
190195
191196 public function testConfigLoadCloudfrontWithClient ()
192197 {
198+ if (!class_exists (CloudFront::class)) {
199+ $ this ->markTestSkipped ('jean-beru/fos-http-cache-cloudfront not available ' );
200+ }
201+
193202 $ container = $ this ->createContainer ();
194203 $ this ->extension ->load ([
195204 [
You can’t perform that action at this time.
0 commit comments