-
Notifications
You must be signed in to change notification settings - Fork 0
Redundant "runtime" directory generated on test execution #6
Copy link
Copy link
Open
Labels
good first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed
Description
Task Description
When we run tests using composer test, it automatically generates a directory called protected/runtime. The directory doesn't serve any purposes and should not be generated during testing.
Steps to Reproduce
- Clone the repository and run
composer install - Run
composer testto run the tests - Check
testsfolder to find a new subfolder, calledruntime
Implementation Guidance
When instantiating the \framework\components\Logger component, a FileLogger instance is generated, which is responsible for creating the directory.
These are the steps we can take to safely resolve it:
- Create a new interface (e.g.
LogDriver) and implement it forFileLogger. - Remove the log driver from
helpers.phpand register it within the test directory - Allow the
Loggercomponent to accept an optional driver parameter - Modify the test to mock an implementation of the interface, then inject it within the component
Acceptance Criteria
Please test the following before making a pull request:
- Run
composer testto ensure that all tests are passing - Make sure that no tests are removed or added, and
Loggercomponent remains above 90% coverage - Ensure that
FileLoggerclass is not changed, unless you have a valid reason
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed