akamon / mockery-callable-mock
Mockery Callable Mock
Installs: 36 961
Dependents: 12
Suggesters: 0
Security: 0
Stars: 2
Watchers: 50
Forks: 2
Open Issues: 1
Requires
- php: >=5.3.3
Requires (Dev)
- mockery/mockery: ~0.8
- phpunit/phpunit: ~3.7
This package is not auto-updated.
Last update: 2018-08-08 15:27:19 UTC
README
<?php use Akamon\MockeryCallableMock\MockeryCallableMock; // creating a mockery function/callable $mock = new MockeryCallableMock(); // call it normally $mock('foo', 'bar'); call_user_func($mock, 'foo', 'bar'); // add it expectations $mock->shouldBeCalled(); // returns a mockery expectation, so you can use it normally $mock->shouldBeCalled()->with('foo')->once(); $mock('foo'); $mock->shouldBeCalled()->withNoArgs()->twice(); $mock(); $mock(); // returned values $mock->shouldBeCalled()->andReturn('foo'); $retval = $mock(); // creating stubs $stub = new MockeryCallableMock(); $stub->canBeCalled()->with('foo')->andReturn('bar');
Author
Pablo Díez - pablodip@gmail.com
License
Akamon Mockery Callable Mock is licensed under the MIT License. See the LICENSE file for full details.