mpyw/laravel-database-mock
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+.
|
Package
|
Score
|
Description
|
Stars
|
Likes
|
Forks
|
Downloads
|
Issues
|
Score
|
Opportunity
|
License
|
Last Release
|
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| mpyw/mockery-pdo | 0.87 | 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+. | 3 | 3 | 2 | 1K | 1 | 5.1 | 34.5 | MIT | 10 months ago | |
| phpunit/dbunit | 0.86 | 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 | |
| tomb1n0/guzzle-mock-handler | 0.86 | Lightweight mock handler for Guzzle to fake HTTP responses in tests. Queue responses, simulate status codes, headers, and body content, and inspect requests without making real network calls—useful for unit/integration testing of API clients. | 3 | 3 | 2 | 4K | 4 | 1.1 | 42.0 | MIT | — | |
| bneumann/mock-api-bundle | 0.85 | — | 2 | 2 | 0 | 0 | 0 | 0.0 | — | MIT | — | |
| mockery/mockery | 0.85 | 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 | |
| waad/truffle | 0.85 | Truffle is a Laravel package that adds simple, flexible search to your Eloquent models. Define searchable fields, build expressive queries, and filter results with a clean, chainable API—no external search engine or complex setup required. | 51 | 51 | 0 | 53 | 0 | 8.3 | 4.5 | — | 7 months 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 | |
| roundly-consulting/testing-for-laravel | 0.84 | A Laravel testing package that provides practical helpers and assertions to streamline feature and unit tests. It reduces boilerplate and makes it easier to write clear, reliable tests for Laravel applications, from HTTP interactions to application behavior. | 5 | — | 0 | — | 0 | 19.9 | — | MIT | 2 weeks ago | |
| protonemedia/laravel-dusk-fakes | 0.84 | Laravel Dusk Fakes lets you replace real Dusk browser sessions with fakes in your tests. It offers a fluent API to simulate browser interactions and assert Dusk calls, so you can test Dusk-dependent code quickly without launching a real browser. | 20 | 21 | 3 | 2K | 0 | 8.9 | 28.0 | MIT | 7 months ago | |
| php-mock/php-mock | 0.84 | 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 | |
| php-mock/php-mock-prophecy | 0.84 | Prophecy integration for php-mock lets you mock PHP built-in functions like time, rand, and sleep inside Prophecy test doubles. Define expected behavior for global functions alongside class mocks, making time-dependent code testable without hard dependencies. | 16 | — | 4 | — | 0 | 1.5 | — | WTFPL | 11 months ago |
|
| beyondcode/laravel-ask-database | 0.84 | Ask your database questions in plain English. BeyondCode's package uses AI to translate natural language into SQL queries and returns the results, making data exploration easier without writing SQL yourself. | 301 | 276 | 46 | 92 | 0 | 1.6 | 1.1 | MIT | 3 years ago | |
| osmianski/fast-refresh-database | 0.84 | Fast Refresh Database is a Laravel package that speeds up test suites by replacing repeated migrations with a faster database reset strategy, keeping tests isolated and reducing runtime while supporting parallel testing. | 1 | 1 | 0 | 591 | 0 | 16.2 | 39.0 | MIT | 2 months 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 | — | — | |
| donatj/mock-webserver | 0.84 | 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 | |
| myqee/test | 0.84 | — | 0 | 0 | 0 | 0 | 0 | 0.0 | — | — | — | |
| yosimitso/mockdoctrinemanager | 0.84 | A lightweight testing helper that mocks the Doctrine manager so you can unit test persistence-dependent code without a real database. Swap in the mock to stub repository lookups, flush and transaction calls, keeping tests fast and isolated. | 0 | 0 | 0 | 7 | 0 | 0.3 | 12.5 | — | 6 years ago | |
| imanghafoori/eloquent-mockery | 0.83 | — | 127 | 127 | 20 | 122 | 4 | 2.6 | 5.1 | MIT | 2 years 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 | — | — | |
| testmonitor/eloquent-revisable | 0.83 | Keep a full revision history for your Eloquent models. This package automatically saves snapshots on create, update, and delete, lets you inspect what changed, and restore or revert models to any previous version through a simple, familiar API. | 2 | 2 | 3 | 80 | 0 | 19.3 | 23.3 | MIT | 3 weeks ago |
How can I help you explore Laravel packages today?