mpyw/mockery-pdo
Experimental BDD-style PDO mocking library built on mockery/mockery. Define expectations for prepare/bind/execute and return rows via fetch/fetchAll in a fluent API, making PDO-based code easy to test on PHP 8.2+.
|
Package
|
Score
|
Description
|
Stars
|
Likes
|
Forks
|
Downloads
|
Issues
|
Score
|
Opportunity
|
License
|
Last Release
|
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| mpyw/laravel-database-mock | 0.87 | Experimental Laravel package that mocks underlying PDO connections with Mockery, letting you stub SELECT, INSERT, and UPDATE queries and results for fast, database-free tests. Requires PHP 8.2+ and Laravel 11+. | 6 | 6 | 0 | 1K | 0 | 13.2 | 33.9 | MIT | 4 months ago | |
| polishsymfonycommunity/symfony2-mocker-extension | 0.86 | Behat extension for Symfony2 that lets you mock services in the dependency injection container during tests. Built on Mockery and SymfonyMockerContainer. Consider it a hack and use sparingly; alternative: TestDoubleBundle. | 26 | 26 | 7 | 176 | 0 | 0.6 | 12.1 | MIT | 10 years ago | |
| php-mock/php-mock | 0.85 | 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 | |
| mnapoli/phpunit-easymock | 0.85 | 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 | |
| imanghafoori/eloquent-mockery | 0.85 | — | 127 | 127 | 20 | 124 | 4 | 2.6 | 5.2 | MIT | 2 years ago | |
| tmarsteel/mockery-callable-mock | 0.85 | Create Mockery-friendly callable/function mocks in PHP. Set expectations (with args, counts), return values, stubs, and verify calls or non-calls. Can also wrap a real callable to spy while still invoking it. Requires PHP 7+. | 1 | 1 | 1 | 1K | 0 | 0.9 | 39.7 | — | 9 years ago | |
| mcustiel/phiremock-common | 0.85 | 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 | |
| eloquent/phony-kahlan | 0.85 | — | 5 | 5 | 3 | 15 | 0 | 1.3 | 5.3 | MIT | 5 years ago | |
| phpunit/phpunit-mock-objects | 0.85 | 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 | |
| eloquent/phony-phpunit | 0.85 | Integration of the Phony mocking/stubbing library with PHPUnit, providing helpers to use Phony in your test suite. Note: this package is no longer maintained; see the linked statement and consider alternatives or the main Phony repo. | 6 | 6 | 3 | 713 | 0 | 1.6 | 19.7 | MIT | 5 years ago | |
| php-mock/php-mock-phpunit | 0.84 | 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. | 173 | 176 | 20 | 236K | 4 | 28.3 | 51.3 | WTFPL | 1 month ago | |
| phpunit/dbunit | 0.84 | PHPUnit extension for database interaction testing. Provides DbUnit helpers for setting up database fixtures and asserting database state in tests. Install via Composer (dev) or PHAR. Note: this package is no longer maintained. | 222 | 245 | 183 | 52K | 9 | 5.0 | 25.2 | NOASSERTION | 11 years ago | |
| bentools/doctrine-static | 0.84 | Lightweight in-memory Doctrine mock for unit tests. Create ObjectManagers in a ManagerRegistry, persist/remove and flush to a temporary store, and use repository methods like find, findBy, findOneBy, and findAll. Not for real persistence. | 2 | 3 | 0 | 55 | 0 | 0.0 | 17.8 | — | — | |
| bneumann/mock-api-bundle | 0.84 | — | 2 | 2 | 0 | 0 | 0 | 0.0 | — | MIT | — | |
| php-mock/php-mock-mockery | 0.84 | 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 | |
| psr-mock/http-client-implementation | 0.84 | Tiny PSR-18 HTTP client implementation intended for mocking and testing. Provides a simple client you can plug into PSR-7/PSR-17 workflows to return predefined responses without real network calls. | 1 | 1 | 0 | 3K | 0 | 0.6 | 44.8 | MIT | 2 years ago | |
| donatj/mock-webserver | 0.83 | Lightweight PHP mock web server for tests and local development. Spin up an HTTP server on a random port, enqueue canned responses, inspect received requests, and simulate endpoints reliably. Handy for integration tests without external services. | 141 | 142 | 22 | 72K | 5 | 17.6 | 42.3 | MIT | 8 months ago | |
| phake/phake | 0.83 | 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. | 478 | 486 | 86 | 66K | 13 | 23.7 | 37.2 | NOASSERTION | 8 months ago | |
| php-mock/php-mock-integration | 0.83 | 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 | |
| janmarek/mockista | 0.83 | 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 | 248 | 2 | 1.4 | 14.9 | — | — |
How can I help you explore Laravel packages today?