-
Notifications
You must be signed in to change notification settings - Fork 38
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
Move this to PHPUnit? #13
Comments
@sebastianbergmann I wanted to look into it but am quite busy with Behat at the moment. I'm obviously with both hands to increase the reach of Prophecy to PhpUnit users, so if you have time and desire to move in this direction you have my complete support and help (with limited amount of time I have on hands) :) The only condition I would push for is for Prophecy to stay independent from any testing framework out there be it PhpSpec, PhpUnit or Behat - this way we can achieve more with less. But yeah, if that's fine with you, moving this integration directly to PhpUnit can make peoples lives that much easier. |
PHPUnit 4.5 will have out-of-the-box support for Prophecy, see sebastianbergmann/phpunit@6c21c66 for details. |
Having native support in PHPUnit 4.5 is a great news. I still find it unfortunate that integrating tools with PHPUnit involves extending the TestCase each time, making it a pain for external tools to provide the integration (unless they decide to build their integration on top of a previous integration). A way to extend PHPUnit without relying on inheritance in the TestCase could make things much more flexible in the future, avoiding to push everything into PHPUnit itself. I don't know how such API could look like though |
I totally agree, Christophe. However, the current architecture of PHPUnit is as it is; fourteen years old and full of problems that cannot be fixed without breaking BC. Once PHPUnit has been broken down further into smaller components I will start thinking of a new architecture. |
As of sebastianbergmann/phpunit@c512c3e, the branch for PHPUnit 4.4 "bundles" the
ProphecyTestCase
class (as well as Prophecy itself, of course). This makes it even easier to get started with using Prophecy from PHPUnit.However, the more I think about it -- especially with regards to issues such as the one discussed in #6 -- the more I tend to wanting the code of
ProphecyTestCase
insidePHPUnit_Framework_TestCase
directly.What do you think, @everzet? I want to have a rock solid, painless (out-of-the-box), and complete (expectation counter) Prophecy experience for PHPUnit users as soon as possible.
The text was updated successfully, but these errors were encountered: