bovigo/callmap
Stub and mock PHP method and function calls via a callmap. Define fixed returns, callbacks, consecutive results, or thrown exceptions, then verify invocations and arguments. Works with any unit test framework; argument checks via bovigo/assert or PHPUnit.
|
Package
|
Score
|
Description
|
Stars
|
Likes
|
Forks
|
Downloads
|
Issues
|
Score
|
Opportunity
|
License
|
Last Release
|
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| tomb1n0/guzzle-mock-handler | 0.84 | 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 | 2K | 4 | 1.1 | 37.9 | MIT | — | |
| 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). | 369 | 374 | 20 | 545K | 3 | 28.0 | 51.9 | WTFPL | 2 months ago | |
| 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 | 64K | 2 | 21.9 | 52.1 | WTFPL | 1 year ago | |
| mockery/mockery | 0.83 | 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,725 | 10,812 | 463 | 9M | 104 | 87.9 | 82.1 | BSD-3-Clause | 1 year ago | |
| codeception/stub | 0.83 | Create lightweight test doubles for PHP with Codeception Stub. Quickly generate stubs and mocks, define method returns and expectations, and override behavior on the fly—ideal for unit tests that need fast, flexible objects without full implementations. | 300 | 301 | 18 | 1M | 6 | 31.4 | 61.7 | MIT | 2 months ago | |
| phpunit/phpunit-mock-objects | 0.81 | 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,938 | 5,056 | 153 | 542K | 0 | 25.2 | 33.2 | NOASSERTION | 12 years ago | |
| mnapoli/phpunit-easymock | 0.79 | 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 | 708 | 0 | 24.8 | 20.8 | MIT | 1 year ago | |
| bovigo/assert | 0.71 | Functional-style assertions for PHP unit tests. Use assertThat(value, predicate[, description]) for readable checks with helpful failure messages. Integrates with PHPUnit via AssertionFailure extending AssertionFailedError. Requires PHP 8.3+. | 13 | 13 | 6 | 905 | 1 | 29.4 | 29.5 | BSD-3-Clause | 4 months ago | |
| larswiegers/laravel-maps | 0.69 | Easily add maps to your Laravel app with Leaflet or Google Maps. Render basic maps with center points, zoom, markers, bounds (Google), and custom tile hosts like OpenStreetMap or Mapbox. Publish views to customize map output. | 363 | 364 | 42 | 10K | 0 | 28.9 | 23.5 | MIT | 2 months ago | |
| aimeos/map | 0.69 | High-performance e-commerce framework for Laravel/Lumen (and other PHP apps). Provides products, catalog, basket, checkout, customers, orders and admin UI. Extensible via plugins, supports multiple shops/sites, currencies and languages, and scales well. | 4,245 | 4,234 | 16 | 14K | 1 | 21.8 | 8.6 | MIT | — | |
| cuyz/valinor | 0.69 | Valinor maps raw input (JSON/arrays) into fully typed PHP objects, validating along the way with clear, human-readable errors. Supports advanced types (PHPStan/Psalm), shaped arrays, generics, ranges, and can normalize objects back to JSON/CSV while preserving structure. | 1,498 | 1,496 | 88 | 1M | 25 | 47.5 | 58.8 | MIT | 2 weeks ago | |
| spatie/laravel-morph-map-generator | 0.69 | Automatically generates and keeps Laravel Eloquent morph maps up to date. Models register themselves by implementing getMorphClass(), so you don’t forget to add entries. Optional auto-generation on app boot, configurable for custom model locations. | 74 | 73 | 11 | 7K | 0 | 25.5 | 32.3 | MIT | 1 month ago | |
| netresearch/jsonmapper | 0.68 | Map JSON to strongly-typed PHP objects with JSONMapper. Hydrate class properties from stdClass/arrays, support nested objects and collections, docblock/type-hint based mapping, and optional strict checking for missing or invalid fields. | 1,570 | 1,596 | 186 | 2M | 5 | 14.8 | 44.4 | OSL-3.0 | — | |
| symfony/object-mapper | 0.68 | Symfony Object Mapper maps data between objects (e.g., DTOs to entities) using PHP attributes to define field mappings. It reduces boilerplate transformation code, supports configurable mapping logic, and integrates cleanly with Symfony applications. | 34 | 34 | 2 | 172K | 0 | 28.0 | 60.0 | MIT | 1 week ago |
How can I help you explore Laravel packages today?