php-mock/php-mock-mockery
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.
|
Package
|
Score
|
Description
|
Stars
|
Likes
|
Forks
|
Downloads
|
Issues
|
Score
|
Opportunity
|
License
|
Last Release
|
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| php-mock/php-mock | 0.92 | 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-phpunit | 0.91 | 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. | 171 | 174 | 20 | 230K | 3 | 28.5 | 51.3 | WTFPL | 2 months ago | |
| php-mock/php-mock-integration | 0.90 | 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 | 306K | 0 | 23.0 | 65.0 | WTFPL | 2 months ago | |
| phpunit/phpunit-mock-objects | 0.89 | 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.88 | 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 | |
| phpstan/phpstan-mockery | 0.88 | PHPStan extension for Mockery: infers intersection types for mocks (Foo&MockInterface), understands shouldReceive/shouldHaveReceived/allows/expects, supports partial/alias/overload mocks, multiple interfaces, and proper constructor args for accurate static analysis. | 102 | 100 | 24 | 995K | 9 | 29.7 | 68.8 | MIT | 1 year ago | |
| mockery/mockery | 0.79 | 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 | |
| kubawerlos/php-cs-fixer-custom-fixers | 0.69 | Adds a curated set of custom fixers for PHP-CS-Fixer to enforce consistent, opinionated code style beyond the built-in rules. Plug in the fixers, combine with your config, and keep large PHP codebases clean and uniform. | 238 | 239 | 26 | 344K | 4 | 32.0 | 52.2 | MIT | 1 month ago | |
| phpcompatibility/php-compatibility | 0.67 | PHPCompatibility is a PHP_CodeSniffer ruleset that scans PHP code for cross-version compatibility issues. Check support for specific PHP versions, detect deprecated/removed features, and audit projects when upgrading or maintaining multi-version support. | 2,282 | 2,294 | 204 | 2M | 86 | 65.6 | 80.1 | LGPL-3.0 | 4 months ago | |
| imanghafoori/php-token-analyzer | 0.67 | Analyzes PHP code tokens without execution—like reflection but pure PHP. Framework-agnostic, lightweight dependency extracted from Laravel-Microscope. Supports PHP 7.4+ with automated tests for accuracy. Extract class/method details, token types, and structure effortlessly. Ideal for static analysis... | 16 | 16 | 3 | 7K | 0 | 20.5 | 42.4 | — | 4 years ago | |
| lucianotonet/groq-php | 0.67 | PHP client for the Groq API. Provides a simple, lightweight way to call Groq LLM endpoints from PHP apps, with support for common chat/completions workflows and easy integration into existing projects. | 81 | 83 | 18 | 26K | 3 | 25.6 | 41.2 | MIT | 10 months ago | |
| pedrotroller/php-cs-custom-fixer | 0.67 | Custom fixers for PHP-CS-Fixer. Adds rules like ordering Behat context step definition methods by annotation and method name, with options for detecting context classes. Install via Composer and register the fixers in your .php_cs(.dist) config. | 81 | 83 | 10 | 17K | 4 | 32.2 | 45.2 | — | 6 months ago |
How can I help you explore Laravel packages today?