Closed sebastianblum closed 8 years ago
Cool, didn't know that this is possible. Checking details later and will provide some feedback.
Why are you using fake classes instead of mocking?
I wrote a lot of tests for debugging and then I left these tests.
I don't want to mock the container and before, I used stdClass while debugging. With the Fake classes I will show, that I can overwrite the class parameter and I will get an instance of that class.
I don't know a better pattern to test that.
the symfony team uses stdClass and at the end a FooClass https://github.com/symfony/symfony/blob/master/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php#L721 or https://github.com/symfony/dependency-injection/blob/master/Tests/Fixtures/includes/classes.php
:+1:
Thanks for contributing!
I created the issue #34 (in german) and here is my code proposal.
please give me feedback that I can work on that pull request. Sebastian