1

I'm trying to write a kernel test for a service in my custom module.
This service depends on certain configuration values that are installed by default when the module is enabled. Values are stored in /config/install/mymodule.settings.yml
If I try to get these configuration values in my test setUp() function, I get the correct value.
However, when the test is running, the same value is null when called from inside the service.
Any idea why?

1 Answer 1

2

Turned out to be a very silly mistake...
I instatiated the service before installing the config with $this->installConfig(['mymodule'])

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.