Skip to content

Commit a452810

Browse files
committed
[Tests] Add coverage for expression config container compilation
1 parent 4350695 commit a452810

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/Unit/DependencyInjection/FOSHttpCacheExtensionTest.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
2727
use Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag;
2828
use Symfony\Component\DependencyInjection\Reference;
29+
use Symfony\Component\ExpressionLanguage\ExpressionLanguage;
2930
use Symfony\Component\HttpKernel\Controller\ControllerResolverInterface;
3031
use Symfony\Component\Routing\Router;
3132

@@ -507,6 +508,20 @@ public function testConfigLoadCacheControlExpressionWithOverriddenExpressionLang
507508
);
508509
}
509510

511+
public function testContainerCompilesWithCacheControlExpressionConfig(): void
512+
{
513+
$config = $this->getCacheControlExpressionFullConfig();
514+
515+
$container = $this->createContainer();
516+
$this->extension->load([$config], $container);
517+
518+
$container->addDefinitions(['app.expression_language' => new Definition(ExpressionLanguage::class)]);
519+
520+
$container->compile();
521+
522+
$this->expectNotToPerformAssertions();
523+
}
524+
510525
/**
511526
* Check if comma separated strings are parsed as expected.
512527
*/

0 commit comments

Comments
 (0)