-
Notifications
You must be signed in to change notification settings - Fork 39
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
Change the implementation to use only a trait. #20
Conversation
@sebastianbergmann I added assertions on the status of tests in #21 to ensure that a failed prediction is properly reported as a failure and not as an error. This is passing with the existing implementation and PHPUnit before sebastianbergmann/phpunit@0c85ee1 (tests are of course failing after this commit as we cannot override |
Good catch! I tested this locally, of course, and it worked. But that was obviously without #21. The correct template method to use would be There is no annotation support for Can you rename |
Well, changing this to |
OK, for |
I confirm that re-introducing |
@sebastianbergmann I merged #21 so the new assertions are now part of the testsuite. |
Note however that I really like the integration based purely on a trait rather than needing a base class. It makes things much easier. |
As do I: which is why this pull request removes |
@sebastianbergmann could you rebase your own master branch on top of the upstream one rather than having done the opposite (which does not actually fix merge conflicts, and duplicates the commit from #21) ? Btw, it might be easier to use feature branches to send PRs rather than using your master branch. |
Done. |
@sebastianbergmann the diff in sebastianbergmann/phpunit#4141 (comment) about the removal of the built-in Prophecy support contains 2 removals which might affect this third-party integration:
It might be great to plan for a replacement feature, to allow these things to be done from the trait. I fear that the testsuite of prophecy-phpunit would not stay green with such removal patch applied. |
This removes the
ProphecyTestCase
class and moves the remaining logic to theProphecyTrait
trait.