phpspec/prophecy-phpunit
Integrates the Prophecy mocking library with PHPUnit for simpler, cleaner test doubles. Install via Composer and use the ProphecyTrait to call prophesize() inside your TestCase, set method predictions/returns, and reveal mocks for injection.
Full Changelog: https://github.com/phpspec/prophecy-phpunit/compare/v2.4.0...v2.5.0
Full Changelog: https://github.com/phpspec/prophecy-phpunit/compare/v2.3.0...v2.4.0
prophesize methodFull Changelog: https://github.com/phpspec/prophecy-phpunit/compare/v2.1.0...v2.2.0
Full Changelog: https://github.com/phpspec/prophecy-phpunit/compare/v2.0.1...v2.0.2
Add support for PHP 8
Rewrite of the library for PHPUnit 9.1+, with a new API based on a trait rather than a base class.
setUp methodNote that this integration in the ProphecyTestCase is not necessary anymore for PHPUnit 4.5 as it provides support for prophecy natively (using the same prophesize API so the migration is a matter of changing the parent class)
Marked the ProphecyTestCase as abstract to avoid PhpUnit to try running it as a testcase
How can I help you explore Laravel packages today?