task/phpunit 问题修复 & 功能扩展

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

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

task/phpunit

Composer 安装命令:

composer require task/phpunit

包简介

PHPUnit plugin for Task

README 文档

README

Build Status Coverage Status

Installation

Install via Composer:

...
    "require-dev": {
        "task/phpunit": "~0.2"
    }
...

Example

use Task\Plugin\PHPUnitPlugin;

$project->inject(function ($container) {
    $container['phpunit'] = new PHPUnitPlugin;
});

$project->addTask('phpunit', ['phpunit', function ($phpunit) {
    $phpunit->getCommand()
        ->useColors()
        ->setBootstrap('tests/bootstrap.php')
        ->pipe($this->getOutput());
}]);

Usage

Given:

$project->addTask('phpunit', ['phpunit', function ($phpunit) {
    $phpunit->getCommand()
    ...

setTestCase

->setTestCase('MyTest')
$> phpunit MyTest

setTestFile

->setTestFile('MyTest.php')
$> phpunit MyTest.php

useColors

->useColors()
$> phpunit --colors

setBootstrap

->setBootstrap('bootstrap.php')
$> phpunit --bootstrap bootstrap.php

setConfiguration

->setConfiguration('phpunit.xml')
$> phpunit --configuration phpunit.xml

addCoverage

->addCoverage('html')
$> phpunit --coverage-html

setInitValue

->setIniValue('foo', 'bar')
$> phpunit -d foo=bar

useDebug

->useDebug()
$> phpunit --debug

setFilter

->setFilter('/foo/')
$> phpunit --filter /foo/

setTestsuite

->setTestsuite('unit')
$> phpunit --testsuite unit

addGroups

->addGroups(['foo', 'bar'])
$> phpunit --group foo,bar

excludeGroups

->excludeGroups(['foo', 'bar'])
$> phpunit --exclude-group foo,bar

addTestSuffixes

->addTestSuffixes(['.phpt', '.php'])
$> phpunit --test-suffix .phpt,.php

setIncludePath

->setIncludePath('./src')
$> phpunit --include-path ./src

setPrinter

->setPrinter('MyPrinter')
$> phpunit --printer MyPrinter

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-04-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固