duncan3dc/uopz-expectations 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

duncan3dc/uopz-expectations

最新稳定版本:1.0.0

Composer 安装命令:

composer require --dev duncan3dc/uopz-expectations

包简介

Mock core functions and set up expectations similar to Mockery

README 文档

README

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

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.

Installation

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;

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/

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

duncan3dc/uopz-expectations for enterprise

Available as part of the Tidelift Subscription

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.

统计信息

  • 总下载量: 225.26k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 8
  • 点击次数: 1
  • 依赖项目数: 4
  • 推荐数: 0

GitHub 信息

  • Stars: 8
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2018-05-07