Mock core functions and set up expectations similar to Mockery

0.1.0 2018-05-08 21:51 UTC


Mock core functions and set up expectations similar to Mockery.

Full documentation is available at http://duncan3dc.github.io/uopz-expectations/
PHPDoc API documentation is also available at http://duncan3dc.github.io/uopz-expectations/api/

release build coverage


The uopz extension offers an easy to way mock core functions.
The Mockery library offers a succinct API to declare expectation method calls.
This library combines the two to offer core function mocking with a familiar API.


The recommended method of installing this library is via Composer.

Run the following command from your project root:

$ composer require --dev duncan3dc/uopz-expectations

Getting Started

use duncan3dc\Mock\CoreFunction;


time(); # 777

 * At this point the expectations will be checked,
 * and an exception will be throw as `time()`
 * should have been called twice.

Read more at http://duncan3dc.github.io/uopz-expectations/

Where to get help

Found a bug? Got a question? Just not sure how something works?
Please create an issue and I'll do my best to help out.
Alternatively you can catch me on Twitter