Here is my problem.
I have a test suite that tests several classes. My classes use dependency injection.
I have a class called scheduleHandler that passes all the tests. Then my other ruleHandler rule has a method that requires an instance of scheduleHandler. I donβt want to go through a real handler schedule, so I tried to create a scheduleHandler layout for input.
The problem is that since the scheduleHandler class is tested in the set above ruleHandler when the mock is created, I get: -
PHP Fatal error: Cannot redeclare class scheduleHandler
If I do not use the test suite and run the tests individually, everything is fine.
Does anyone know a way around this?
source share