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

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

Technical Evaluation

Architecture fit: Strong for legacy codebases with procedural dependencies on built-in functions (e.g., time(), rand()), but redundant for DI-heavy architectures where mocks are injected via constructors. Fits PHPUnit-centric projects but adds complexity where testable abstractions already exist.
Integration feasibility: Straightforward via PHPUnit traits/rules for basic use cases, but requires validation against current PHP/PHPUnit versions. Potential conflicts with other test helpers

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