If you want to write file logging output to a separate log file during tests, thus avoiding the potential problem of a different user account lacking write permission to the log file, you can add string key(s) to the ‘routes’ array.
Remember to add corresponding key(s) in the main configuration, thus allowing mergeArray() to replace the existing route declaration(s).
This looks interesting somehow - but i don’t understand how you use the array keys to prevent permission problems. Could you please explain a little more?
With the default 644 file permission, only the file owner will have write access. The web server process doesn’t normally use the same account as a command line user. Of course, it’s possible to remove any existing log file before and after a (command line) test session.
I decided to work around the problem by switching to a different log file name in the test configuration file log route. The easiest way to suspend the main configuration log route would be to have the test configuration replace it. For this to happen, the key has to be of string type, not implicit numeric type. The latter will be renumbered by mergeArray() instead of replacing any existing key.