Prophecy is a highly opinionated yet very powerful and flexible PHP object mocking framework. Though initially it was created to fulfil phpspec2 needs, it is flexible enough to be used inside any testing framework out there with minimal effort. First, add Prophecy to the list of dependencies inside your composer.json, then, simply install it with composer. First of all, in Prophecy every word has a logical meaning, even the name of the library itself (Prophecy). When you start feeling that, you'll become very fluid with this tool. For example, Prophecy has been named that way because it concentrates on describing the future behavior of objects with very limited knowledge about them. But as with any other prophecy, those object prophecies can't create themselves, there should be a Prophet. Prophecy enforces same method prophecies and, as a consequence, same promises and predictions for the same method calls with the same arguments.

Features

  • The Prophet creates prophecies by prophesizing them
  • Prophecy requires PHP 7.2.0 or greater
  • It concentrates on describing the future behavior of objects with very limited knowledge about them
  • Out-of-the-box spies support
  • Prophecy records every call made during the double's entire lifetime
  • You don't need to record predictions in order to check them

Project Samples

Project Activity

See All Activity >

Follow Prophecy

Prophecy Web Site

Other Useful Business Software
Go From AI Idea to AI App Fast Icon
Go From AI Idea to AI App Fast

One platform to build, fine-tune, and deploy ML models. No MLOps team required.

Access Gemini 3 and 200+ models. Build chatbots, agents, or custom models with built-in monitoring and scaling.
Try Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Prophecy!

Additional Project Details

Programming Language

PHP

Related Categories

PHP Frameworks, PHP Object Oriented Software

Registered

2021-07-16