承接 jimmyoak/phpunit-test-checker 相关项目开发

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

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

jimmyoak/phpunit-test-checker

Composer 安装命令:

composer require --dev jimmyoak/phpunit-test-checker

包简介

README 文档

README

Description

Check for classes without tests. Intended for pre-commit hook.

Usage

Config file example (phpunit-test-checker.json):

{
  "suites": [
    {
      "src-path": "src/",
      "test-path": "test/",
      "test-case-suffix": "Test"
    }
  ]
}

Read config and check for classes with no tests:

use JimmyOak\PhpUnitChecker\Checker\Checker;

require_once __DIR__ . '/vendor/autoload.php';

$checker = new Checker(\JimmyOak\PhpUnitChecker\Config\JsonConfigReader::readFile(__DIR__ . '/phpunit-test-checker.json'));
$checker->check();

Output:

Classes with no tests:
        - Checker/Checker.php
        - Command/CheckerCommand.php

But if we run with this config...:

{
  "suites": [
    {
      "src-path": "src/",
      "test-path": "test/",
      "test-case-suffix": "Test",
      "excluded": [
        "Checker/Checker.php",
        "Command/"
      ]
    }
  ]
}

Outputs nothing :)

"Excluded" is just a regex like /^Command/, therefore if it's a folder put the / separator at the end.

TODO

A lot of improvements. This is only an approach. (Proof of concept)

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-01-21

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固