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
$300 Free Credits to Build on Google Cloud Icon
$300 Free Credits to Build on Google Cloud

New to Google Cloud? Get $300 in credits to explore Compute Engine, BigQuery, Cloud Run, Gemini Enterprise Agent Platform, and more.

Start your next project with $300 in free Google Cloud credit. Spin up VMs, run containers, query petabytes in BigQuery, or build agents with Gemini Enterprise Agent Platform. Once your credits are used, keep building with 20+ always-free tier products including Compute Engine, Cloud Storage, GKE, and Cloud Run functions. No commitment required—just sign up and start building.
Claim $300 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