mnapoli/phpunit-easymock
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.
Full Changelog: https://github.com/mnapoli/phpunit-easymock/compare/1.4.0...1.5.0
Support PHP 8
Upgrade to PHPUnit 8|9, support PHP 7.3 and up.
Compatibility with PHPUnit 8.
#10 Compatibility with PHPUnit 7
Stable version for PHPUnit 6.
#5 Fix test for compatibility with latest version of PHPUnit
Fix #4: Compatibility with PHPUnit 5.4 and phpunit/phpunit-mock-objects 3.2
#3 Compatibility with PHPUnit 5
Added EasyMock::spy() to create a spy instead of a mock: it asserts that methods are called at least once.
Wrong tag :)
It is possible to call the mock() method again on an existing mock:
$mock = EasyMock::mock('My\Class');
$mock = EasyMock::mock($mock, [
'sayHello' => 'Hello',
]);
Support for throwing exceptions in mocked methods.
First release.
How can I help you explore Laravel packages today?