-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Increasing Developer Experience, no longer extend the TestCase #2419
Comments
I have similar ideas but this won't happen before PHPUnit 7. |
Is there perhaps something that can be worked on? It's not something I need right now, but I think it would be a great addition in the future |
FYI, And registering you own TestClass with DI in a suite is already possible https://github.com/sebastianbergmann/phpunit/blob/5.7/src/Framework/TestSuite.php#L203 it's only a bit more work. |
preferably I even use |
@iltar FYI we have a similar implementation in Codeception to make the most lightweight PHPUnit test. We ended with this class https://github.com/Codeception/Codeception/blob/2.2/src/Codeception/Test/Test.php However, it would be very nice to see decomposed |
I did not have time to do this for PHPUnit 7. I will close this ticket, to me this is related to #10. |
The last month or so, I've been working on setting up a tool to test a bunch of applications. Those applications are not in the tool itself and I mainly need to use Selenium and a few helper classes. However, I'm hitting the issue that I can't really do proper DI and I end up having a bunch of traits and "hacks" to get things working.
I would like to increase the Developer Experience when writing test cases, not only when in need of dependencies, but in general. When it comes to using the test runner of phpunit, you're fairly limited to what you can actually do. I would like to propose a few small changes that should be fully backwards compatible with the current system. I have a bunch of ideas besides of this, but if you like the idea of increasing developer experience, I will work those out with more details and post them in a new issue.
My current suggestion:
The text was updated successfully, but these errors were encountered: