chornij/console 问题修复 & 功能扩展

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

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

chornij/console

最新稳定版本:0.1.4

Composer 安装命令:

composer require chornij/console

包简介

Console tools

README 文档

README

Code Climate Test Coverage Build Status

  • Report component - allow colorize output in console (useful for testing)

Installation

The preferred way to install this component is through composer.

Either run

php composer.phar require chornij/console "0.1.*"

or add

"chornij/console": "0.1.8"

to the require section of your composer.json file.

USAGE

Using Report component in PHPUnit tests:

<?php

class ReportTest extends \PHPUnit_Framework_TestCase
{

    /**
     * @var Report Report object
     */
    private $report;

    /**
     * @inheritdoc
     */
    public function setUp()
    {
        $this->report = new Report();
        
        echo $this->report->title('Testing some component');
    }
    
    public function testComponent()
    {
        $this->report->write('Start testing', 'blue');
        
        $obj = new Component();
        $obj->attribute = 1234;
        
        $this->assertTrue($obj->isValidated());
        
        $this->report->write($obj->result, 'green');
        
        $this->report->write('XML result:', ['bold', 'magenta']);
        $this->report->writeXml($obj->xmlResult);
    }

}

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-08-03