2017 © Pedro Peláez
 

library uopz-expectations

Mock core functions and set up expectations similar to Mockery

image

duncan3dc/uopz-expectations

Mock core functions and set up expectations similar to Mockery

  • Monday, July 9, 2018
  • by duncan3dc
  • Repository
  • 1 Watchers
  • 7 Stars
  • 13 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

uopz-expectations

Mock core functions and set up expectations similar to Mockery., (*1)

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/, (*2)

release build coverage, (*3)

Introduction

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., (*4)

Installation

The recommended method of installing this library is via Composer., (*5)

Run the following command from your project root:, (*6)

$ composer require --dev duncan3dc/uopz-expectations

Getting Started

use duncan3dc\Mock\CoreFunction;

CoreFunction::mock("time")->twice()->with()->andReturn(777);

time(); # 777

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

Read more at http://duncan3dc.github.io/uopz-expectations/, (*7)

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, (*8)

duncan3dc/uopz-expectations for enterprise

Available as part of the Tidelift Subscription, (*9)

The maintainers of duncan3dc/uopz-expectations and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. Learn more., (*10)

The Versions

09/07 2018

dev-master

9999999-dev https://github.com/duncan3dc/uopz-expectations

Mock core functions and set up expectations similar to Mockery

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

mock mockery phpunit testing core mocking uopz

09/07 2018

0.2.0

0.2.0.0 https://github.com/duncan3dc/uopz-expectations

Mock core functions and set up expectations similar to Mockery

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

mock mockery phpunit testing core mocking uopz

08/05 2018

0.1.0

0.1.0.0 https://github.com/duncan3dc/uopz-expectations

Mock core functions and set up expectations similar to Mockery

  Sources   Download

Apache-2.0

The Requires

  • ext-uopz *
  • php ^7.1

 

The Development Requires

mock mockery phpunit testing core mocking uopz