定制 pmvc-plugin/unit 二次开发

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

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

pmvc-plugin/unit

Composer 安装命令:

composer require pmvc-plugin/unit

包简介

PMVC Test Framework

README 文档

README

Latest Stable Version Latest Unstable Version CircleCI License Total Downloads

A simple phpunit wrapper let it support phpunit 4.8.36, 8.5.52, ^9.6, ^10.5, ^11.5

In another word.

You could use is cross php version 5.6 -> 8.x+

function mapping table

phpunit PMVC/unit
__construct pmvc_init
setup pmvc_setup
teardown pmvc_teardown
assertContains haveString
assertStringContainsString haveString
assertStringContainsString haveString
getMockBuilder getPMVCMockBuilder
setMethods pmvc_onlyMethods
onlyMethods pmvc_onlyMethods

Code example

tests/include.php example

<?php

$path = __DIR__ . '/../vendor/autoload.php';
include $path;

\PMVC\Load::plug(
    ['unit' => null],
    [__DIR__ . '/../../']
);

Php TestCase code example

<?php

namespace PMVC\PlugIn\hell_world;

use PMVC\TestCase;

class HelloWorldTest extends TestCase
{

}

CI config example

PHPUnit Tip

  • Show event
phpunit --log-events-text php://stdout
  • show deprecations
phpunit --display-deprecations --testdox

Install with Composer

1. Download composer

2. Install by composer.json or use command-line directly

2.1 Install by composer.json

  • vim composer.json
{
    "require": {
        "pmvc-plugin/unit": "dev-main"
    }
}
  • php composer.phar install

2.2 Or use composer command-line

  • php composer.phar require pmvc-plugin/unit
  • or
    • composer require pmvc-plugin/unit

Other Polyfills

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-03-31

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固