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
MongoDB Atlas runs apps anywhere Icon
MongoDB Atlas runs apps anywhere

Deploy in 115+ regions with the modern database for every enterprise.

MongoDB Atlas gives you the freedom to build and run modern applications anywhere—across AWS, Azure, and Google Cloud. With global availability in over 115 regions, Atlas lets you deploy close to your users, meet compliance needs, and scale with confidence across any geography.
Start 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