symfony tests with diffrent parameters, reload paramterbag

Viewed 18

I need a unit test with diffrent paramtervalues from a param file:

# config/parameters.yaml

app:
  some_value: true

In the unit test i want to test it once with app.some_value == true and once with app.some_value == false

$client = static::createClient();
$client->getContainer()->setParameter('app.some_value', false);

is not allowed because LogicException: Impossible to call set() on a frozen ParameterBag.

even if i change the value directly in the config, I can't reload the config. How to write tests with diffrent parameter values, by eigther setting the parameter at runtime or force reloading the kernel, which would reload the paramters from config/parameters.yaml

Your suggestions are highly appreciated.

0 Answers
Related