承接 kahlan/extra-matcher 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

kahlan/extra-matcher

最新稳定版本:1.0.0

Composer 安装命令:

composer require kahlan/extra-matcher

包简介

Additional matchers for Kahlan.

README 文档

README

Build Status Code Coverage

Installation

via Composer

$ composer require --dev kahlan/extra-matcher

Registration

To manually register the matchers you want, add them in your kahlan-config.php config file like in the following example:

use Kahlan\Extra\Matcher\ExtraMatchers;

ExtraMatchers::register(['toBeOneOf', ...]);

Or in case you want to register all matchers, you can simply write:

use Kahlan\Extra\Matcher\ExtraMatchers;

ExtraMatchers::register();

Documentation

toBeOneOf($expected) // strict comparison

it("passes if $actual is present in $expected", function() {
    expect(3)->toBeOneOf([1, 2, 3]);
});

toEqualOneOf($expected) // loose comparison

it("passes if $actual is present in $expected", function() {
    expect("3")->toEqualOneOf([1, 2, 3]);
});

toImplement($expected) // object implements expected interface

namespace App\Spec;

it("passes if $actual implements $expected", function() {

    interface Foo { }
    class Bar implements Foo {}

    $actual = new Bar();
    expect($actual)->toImplement('App\Spec\Foo');
});

统计信息

  • 总下载量: 1.54k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 6
  • 点击次数: 2
  • 依赖项目数: 5
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-10-14

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固