phpspec/prophecy
Highly opinionated yet flexible PHP mocking framework for unit tests. Create test doubles with a Prophet, define expected calls and return values, then reveal mocks and verify predictions. Works with PHPUnit and other frameworks; requires PHP 7.2+.
|
Package
|
Score
|
Description
|
Stars
|
Likes
|
Forks
|
Downloads
|
Issues
|
Score
|
Opportunity
|
License
|
Last Release
|
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| mockery/mockery | 0.86 | Mockery is a flexible PHP mock object framework for unit testing with PHPUnit, PHPSpec, and more. It provides a readable DSL to define expectations and interactions, integrates cleanly with PHPUnit, and can be used alongside PHPUnit’s own mocking tools. | 10,722 | 10,807 | 463 | 9M | 105 | 67.9 | 61.9 | BSD-3-Clause | 2 years ago | |
| phpspec/prophecy-phpunit | 0.85 | 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. | 194 | 195 | 42 | 1M | 1 | 19.3 | 60.3 | MIT | 3 months ago | |
| mnapoli/phpunit-easymock | 0.80 | A lightweight bridge between PHPUnit and EasyMock for PHP. Quickly create, replay, and verify mocks from your test cases with minimal boilerplate, helping you write clear unit tests using the familiar EasyMock-style workflow. | 38 | 38 | 4 | 1K | 0 | 24.8 | 20.8 | MIT | 1 year ago | |
| console-helpers/prophecy-phpunit | 0.80 | PHPUnit integration helpers for Prophecy, providing convenience traits and utilities to streamline mock creation, prophecy assertions, and cleanup in your test suite. Designed to reduce boilerplate and keep Prophecy-based unit tests tidy and consistent. | 0 | 0 | 1 | 173 | 0 | 19.3 | — | MIT | 3 weeks ago | |
| jangregor/phpstan-prophecy | 0.78 | PHPStan extension for phpspec/prophecy that improves type inference in tests. It teaches PHPStan the real types returned from Prophecy workflows like prophesize(), willExtend(), and reveal(), so your revealed doubles are understood as the mocked class. | 111 | 111 | 30 | 455K | 3 | 23.0 | 56.1 | MIT | 3 months ago | |
| pestphp/pest-plugin | 0.68 | Plugin API for Pest PHP, the elegant testing framework. Use it to build and distribute Pest plugins that extend the runner, add custom expectations, hooks, and tooling integrations for your PHP test suite. | 0 | 47 | — | 4M | — | 0.9 | 55.6 | — | — | |
| matthiasmullie/scrapbook | 0.67 | Scrapbook is a PHP caching library that wraps PSR-6/PSR-16 cache backends with adapters, multi-cache fallbacks, buffering and stampede protection. Use it to add fast, resilient caching with minimal code changes across files, memory or Redis stores. | 322 | 328 | 27 | 84K | 0 | 2.4 | 32.5 | MIT | — | |
| spatie/pest-expectations | 0.67 | Add expressive, chainable expectations to Pest tests with Spatie’s helpers. Provides handy assertion-style methods for cleaner, more readable tests, letting you validate values, types, strings, arrays, and more with minimal boilerplate. | 79 | 78 | 4 | 7K | 0 | 21.8 | 30.1 | MIT | 3 months ago | |
| weirdan/codeception-psalm-module | 0.67 | Codeception module that integrates Psalm static analysis into your test workflow. Run Psalm checks as part of Codeception suites to catch type issues and improve PHP code quality during CI and local testing. | 5 | 5 | 7 | 2K | 3 | 7.9 | 35.7 | MIT | 3 years ago |
How can I help you explore Laravel packages today?