定制 mehr-als-nix/assumptions 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

mehr-als-nix/assumptions

最新稳定版本:v4.0.0

Composer 安装命令:

composer require --dev mehr-als-nix/assumptions

包简介

Assumptions can be used to skip tests when common preconditions, like the PHP Version or installed extensions, are not met.

README 文档

README

Build Status Code Climate Test Coverage Dependency Status Latest Stable Version Latest Unstable Version License Total Downloads Build status

Introduction

Assumptions can be used to skip tests when common preconditions, like the PHP Version or installed extensions, are not met.

The default PHPUnit runner treats tests with failing assumptions as skipped. Custom runners may behave differently.

We have included several assumptions like assumeTrue, assumeExtensionLoaded,... by default. All of those functions are subsumed in assumeThat, with the appropriate Hamcrest matcher.

A failing assumption in a @before or @beforeClass method will have the same effect as a failing assumption in each @test method of the class.

The concept behind Assumptions for PHPUnit is based on the adequate junit feature, which is documented on their wiki - Assumptions with assume

Note

There is a similar feature in PHPUnit called @requires!

If you are familiar in using @requires annotation to dedicate that a given requirement would be given and you are happy about, then you just do not need the use of Assumption for PHPUnit.

But if you want to have

  • code completion
  • better readability
  • finer control
  • more requirement abilities

then you should give Assumption for PHPUnit a try.

Requirements

  • PHP >= 7.1

if you are looking for a version which supports PHP < 7.0.7 just use the v2.0.0

Installation

see wiki:installation

Assumptions

see wiki:assumptions

Examples

see wiki:examples

ResultPrinter

see wiki:result-printer

统计信息

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

GitHub 信息

  • Stars: 2
  • Watchers: 2
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-05-17