Empowering People Ethically with the leading open source alternative to Google Analytics that gives you full control over your data. Matomo lets you easily collect data from websites & apps and visualise this data and extract insights. Privacy is built-in. Liberating Web Analytics. Star us on Github? +1. And we love Pull Requests!
it shouldn't be visible from tests, shouldn't be set implicitly in environment. Tests should use only global.ini.php, and explicit TestConfig class.
Why is this bad?
One config might affect many places and many tests, thus test can give fake results.
Every test should be isolated as much as possible, especially from local instance settings.
Every test should set its own Config, so it is possible to test many various cases. Config values might exclude some scenarios. Eg. If you have set config for scenario A it might affect scenario B and give fake result.
There might be a test that will have to physically write to config. If value will stay in config it might break some other tests.
:+1: absolutely agree. Our tests shouldn't depend on the local configuration file. a pull request would be very welcome, or we will investigate in coming months / during 3.0.0 dev cycle
If I set some value in config.ini.php
running any test I get:
it shouldn't be visible from tests, shouldn't be set implicitly in environment. Tests should use only global.ini.php, and explicit TestConfig class.
Why is this bad?