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

You Might Also Like
Red Hat Ansible Automation Platform on Microsoft Azure Icon
Red Hat Ansible Automation Platform on Microsoft Azure

Red Hat Ansible Automation Platform on Azure allows you to quickly deploy, automate, and manage resources securely and at scale.

Deploy Red Hat Ansible Automation Platform on Microsoft Azure for a strategic automation solution that allows you to orchestrate, govern and operationalize your Azure environment.
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