reecem/mocker
A lightweight Laravel-friendly mocking helper for PHP tests. Quickly define and swap mocks, set expectations, and control return values to simplify unit and feature testing. Designed to reduce boilerplate and keep test setup clean and readable.
|
Package
|
Score
|
Description
|
Stars
|
Likes
|
Forks
|
Downloads
|
Issues
|
Score
|
Opportunity
|
License
|
Last Release
|
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| janmarek/mockista | 0.81 | Mockista is a lightweight mocking library for PHP/Laravel that helps you create and configure test doubles quickly. Define expectations, stub methods, and verify calls with a simple, fluent API to keep unit tests fast, readable, and maintainable. | 29 | 29 | 14 | 233 | 2 | 1.4 | 14.2 | — | — | |
| imanghafoori/eloquent-mockery | 0.81 | — | 127 | 127 | 20 | 564 | 4 | 2.7 | 11.6 | MIT | 1 year ago | |
| php-mock/php-mock | 0.81 | 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). | 369 | 374 | 20 | 610K | 3 | 21.6 | 50.1 | WTFPL | 4 months ago | |
| mpyw/laravel-database-mock | 0.81 | — | 0 | 6 | — | 2K | — | 0.9 | 34.5 | — | — | |
| avris/function-mock | 0.81 | Mock PHP functions in unit tests without changing your code. avris/function-mock lets you replace and control built-in and user-defined function calls at runtime, making it easier to test legacy code, edge cases, and hard-to-isolate behavior. | 0 | 0 | — | 0 | — | 0.0 | — | — | — | |
| phake/phake | 0.80 | Phake is a PHP mocking framework for PHPUnit and other test runners. Create mocks, stubs, and spies with a simple API, verify method calls and arguments, and define return values or exceptions—ideal for fast, isolated unit tests. | 475 | 483 | 86 | 66K | 13 | 32.6 | 40.0 | NOASSERTION | 3 months ago | |
| mockery/mockery | 0.80 | 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 | 465 | 9M | 105 | 68.0 | 61.9 | BSD-3-Clause | 2 years ago | |
| php-mock/php-mock-mockery | 0.79 | 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 | 71K | 2 | 1.2 | 55.3 | WTFPL | 1 year ago | |
| mcustiel/phiremock | 0.78 | — | 151 | 153 | 15 | 14K | 1 | 10.3 | 27.2 | GPL-3.0 | 5 years ago | |
| codeception/aspect-mock | 0.78 | — | 790 | 790 | 134 | 18K | 40 | 27.4 | 34.2 | MIT | 4 years ago |
How can I help you explore Laravel packages today?