定制 mneudert/junit-scribe 二次开发

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

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

mneudert/junit-scribe

Composer 安装命令:

composer require mneudert/junit-scribe

包简介

Utility to write JUnit XML Documents.

README 文档

README

Utility to write JUnit XML Documents.

Installation

Installation can be done using composer:

{
    "require": {
        "mneudert/junit-scribe": "dev-master"
    }
}

Or simply include in using your favorite autoloading solution.

Usage

use JUnitScribe\Document;
use JUnitScribe\Writer\StringWriter;

$document = new Document();
$document
    ->addSuite()
        ->setName('SuiteAllOk')
        ->addCase()
            ->setName('SomeAssertions')
            ->setAssertions(10)
            ->setTime(0.1236)
            ->getParent()
        ->addCase()
            ->setName('MoreAssertiongs')
            ->setAssertions(7)
            ->setTime(0.2242)
            ->getParent()
        ->getParent()
    ->addSuite()
        ->setName('SuiteNotOk')
        ->addCase()
            ->setName('HasError')
            ->setAssertions(9)
            ->setTime(1.4424)
            ->addError()
                ->setMessage('An Error Occurred.')
                ->setMessageBody('Some lengthy stacktrace or message body for the error.')
                ->getParent()
            ->getParent()
        ->addCase()
            ->setName('HasFailure')
            ->setAssertions(7)
            ->setTime(1.0023)
            ->addFailure()
                ->setMessage('A Failure Occurred.')
                ->setMessageBody('Some lengthy stacktrace or message body for the failure.');

$writer = new StringWriter();
$writer->setDocument($document);

echo $writer->formatDocument();

License

JUnitScribe is licensed under the MIT License - see the LICENSE file for details.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-06-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固