Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Mocker Laravel Package

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.

View on GitHub
Deep Wiki
Context7
1.2.0

Added

  • Add support for Laravel 9
1.1.4

Fixed

  • Variables are no longer polluted between variable calls. #6

  • When calling an object that has an array assigned it will return whole the array as a string, see for more #5

  • See pull request #15

Note

There is a slight bug introduced with this version as to the fact that the arrays returned after the first step are arrays and not instances of Mocked. Cannot assign values after assigning the first time.

1.1.3

Added

  • Add support for laravel 7.0, See merge #13, @blakehooks
1.1.2

Added

  • Support for laravel 6
  • Updated test methods for phpunit
1.1.1

Added

  • add support for array calls
  • make the mocked class extend ArrayObject

Features

  • possibility to make mixed calls to a variable $data->obj['arrayvalue']->anotherObject
1.1.0

Added

  • This release adds a more readable output to the __toString() magic method, this is from #1 feature request.
1.0.2

Changed

  • requirements for the illuminate packages to support laravel/* ^5.6
1.0.1

Fixes

  • Fix composer.json
1.0.0

First release of Mocker - Initial Release


Help

  • Added for new features.
  • Changed for changes in existing functionality.
  • Deprecated for soon-to-be removed features.
  • Removed for now removed features.
  • Fixed for any bug fixes.
  • Security in case of vulnerabilities.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport
twbs/bootstrap4
php-http/client-implementation
phpcr/phpcr-implementation
cucumber/gherkin-monorepo
haydenpierce/class-finder
psr/simple-cache-implementation
uri-template/tests