mhujer/consistence-phpunit 问题修复 & 功能扩展

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

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

mhujer/consistence-phpunit

最新稳定版本:2.1

Composer 安装命令:

composer require mhujer/consistence-phpunit

包简介

Add PHPUnit assert for Enums from consistence/consistence

README 文档

README

Build Status Latest Stable Version Total Downloads License Coverage Status

This library provides EnumAssert PHPUnit assert for consistence/consistence enums.

Installation

$ composer require --dev mhujer/consistence-phpunit

Usage

  1. use \Mhujer\ConsistencePhpunit\EnumAssert;

  2. use the assert this way:

EnumAssert::assertSame($expectedEnum, $actualEnum);

e.g.

public function testEnumsAreSame(): void
{
    EnumAssert::assertSame(CardColor::get(CardColor::RED), CardColor::get(CardColor::BLACK));

    // Expected "Mhujer\ConsistencePhpunit\Fixtures\CardColor:red", but got "Mhujer\ConsistencePhpunit\Fixtures\CardColor:black
}

Requirements

Works with PHP 8.1 or higher and PHPUnit 9.3 or higher.

Submitting bugs and feature requests

Bugs and feature request are tracked on GitHub

Author

Martin Hujer

Changelog

2.0.0 (2022-09-20)

  • require PHP 8.1+
  • add support for native enums to make migration easier

1.2.0 (2021-02-28)

  • require PHP 7.4+
  • allow PHP 8.0
  • require PHPUnit 9.3+

1.1.0 (2020-02-07)

  • allow PHPUnit 9

1.0.0 (2019-11-24)

  • initial release

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-11-24