odan / slim4-skeleton

A Slim 4 Skeleton
https://odan.github.io/slim4-skeleton/
MIT License
439 stars 80 forks source link

logger test's settings are useless #122

Closed jfradj closed 11 months ago

jfradj commented 11 months ago

In the LoggerTestTrait.php class, you're not getting the settings from the container, you're defining by hand the settings for the logger making the settings files in the config folder useless (for configuring the logger).

odan commented 11 months ago

This is on purpose, because this is a (integration) test environment where I don't want to use that configuration from the application. The test only configures a "TestHandler" that allows you to assert for specific logger events.

jfradj commented 11 months ago

Makes sense and that what I thought. Thus the local.test.php should not configure the logger. I mean I was playing with those settings without seeing any impact because it was overridden ^^

odan commented 11 months ago

It is removed now. Thanks for reporting.

odan commented 11 months ago

I had to revert the change, because it is used within the Test-Environment (phpunit) for all loggers.