Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Prophecy Phpunit Laravel Package

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.

View on GitHub
Deep Wiki
Context7
v2.3.0
  • Add more precise type for the prophesize method
v2.1.0
  • Add support for PHPUnit 10.1+ (10.0 is not supported)
  • Bump requirement to Prophecy 1.18+
v2.0.1

Add support for PHP 8

v2.0.0

Rewrite of the library for PHPUnit 9.1+, with a new API based on a trait rather than a base class.

v1.1.0
  • Remove the requirement to call the parent setUp method
  • Add the assertion count for predictions to be compatible with PHPUnit strict mode

Note 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)

v1.0.1

Marked the ProphecyTestCase as abstract to avoid PhpUnit to try running it as a testcase

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport