Weave 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

Php Mock Phpunit Laravel Package

php-mock/php-mock-phpunit

Integrate php-mock with PHPUnit to mock built-in PHP functions (like time(), file_get_contents(), etc.) in a controlled, namespaced way. Ideal for unit tests that need to simulate IO, time, and other global behaviors without changing production code.

View on GitHub
Deep Wiki
Context7
Package
Score
Description
Stars
Likes
Forks
Downloads
Issues
Score
Opportunity
License
Last Release
php-mock/php-mock-mockery 0.92 Integrates php-mock with Mockery to mock PHP built-in functions in tests. Create namespaced function mocks with PHPMockery::mock() and set expectations/returns, then call Mockery::close(). Supports only unqualified calls; define early if needed. 39 39 5 78K 2 1.9 45.4 WTFPL 1 year ago
View on GitHub
php-mock/php-mock 0.92 Mock built-in PHP functions like time() or rand() in tests by leveraging PHP’s namespace fallback: define namespaced replacements for unqualified calls. Works in non-global namespaces; supports common test frameworks via integrations (e.g., PHPUnit). 370 375 19 726K 3 13.0 47.8 WTFPL 9 months ago
View on GitHub
mockery/mockery 0.90 Mockery is a flexible PHP mock object framework for unit testing with PHPUnit, PHPSpec, or any other testing framework. It offers a succinct, human-readable DSL for defining test doubles and integrates easily as a drop-in alternative to PHPUnit's mocking library. 10,724 10,808 470 19M 89 84.3 77.1 BSD-3-Clause 2 months ago
View on GitHub
Context7
php-mock/php-mock-integration 0.89 Integration layer for php-mock, making it easy to use PHP function mocks within popular test frameworks. Helps you stub built-in functions like time(), rand(), and file operations in specific namespaces, enabling reliable, isolated unit tests without touching global state. 14 14 6 374K 0 8.2 57.8 WTFPL 9 months ago
View on GitHub
mnapoli/phpunit-easymock 0.89 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 4.8 20.6 MIT 1 year ago
View on GitHub
phpunit/phpunit-mock-objects 0.87 Default mock object library for PHPUnit. Create test doubles (mocks, stubs, spies) to isolate units under test, define expectations, control method returns, and verify interactions. Designed for PHPUnit projects and compatible with PHP 7.1+. 4,920 5,056 151 759K 0 15.2 21.4 NOASSERTION 13 years ago
View on GitHub
mcustiel/phiremock-common 0.87 Shared utilities for the Phiremock PHP ecosystem. Provides common classes, interfaces, and helpers used across related packages to simplify building and consuming Phiremock client/server components with consistent behavior and minimal duplication. 3 3 5 13K 1 15.5 53.4 GPL-3.0 7 months ago
View on GitHub
Context7
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.
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels
wazza/laravel-db-encryption
hokny/laravel-generator
vonsogt/backup
jengo/queues
jeremykenedy/laravel-observability
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums
rlacerda83/query-parser
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names