Task #67468
closedGet rid of eval() in unit tests
0%
Description
There are a number of unit tests that use eval() to extend the 'class under test' and open protected method by setting them to public in order to test a certain method directly that is otherwise not accessible from the outside. This is usually done for static classes.
Using eval() is rather ugly. The patch from issue #67113 picks one of these evals() and moves it to a fixture file instead. The patch can be used as an example on how to get rid of these eval() calls. As a benefit, tests will be more easy to read, debug and understand.
Other places can be found by looking for calls to eval() in unit test class files.
This issue could be used as an umbrella issue and was written for the Paris sprint. Specific patches for single file changes can be added to own issues that are related or child of this one here.
Updated by Pierrick Caillon over 9 years ago
- Status changed from New to In Progress
- Assignee set to Pierrick Caillon
Updated by Pierrick Caillon over 9 years ago
- Status changed from In Progress to Accepted
- Assignee deleted (
Pierrick Caillon)
There is still work to do there.
I may continue another time.
Updated by Susanne Moog over 9 years ago
- Target version changed from 7.4 (Backend) to 7.5
Updated by Anja Leichsenring over 9 years ago
- Sprint Focus changed from On Location Sprint to Remote Sprint
Updated by Benni Mack about 9 years ago
- Target version changed from 7.5 to 7 LTS
Updated by Christian Kuhn about 7 years ago
- Status changed from Accepted to Closed