You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
963 B
39 lines
963 B
7 years ago
|
<?php
|
||
|
/**
|
||
|
* @link http://www.yiiframework.com/
|
||
|
* @copyright Copyright (c) 2008 Yii Software LLC
|
||
|
* @license http://www.yiiframework.com/license/
|
||
|
*/
|
||
|
|
||
|
namespace yiiunit;
|
||
|
|
||
|
/**
|
||
|
* Class ResultPrinter overrides \PHPUnit\TextUI\ResultPrinter constructor
|
||
|
* to change default output to STDOUT and prevent some tests from fail when
|
||
|
* they can not be executed after headers have been sent.
|
||
|
*/
|
||
|
class ResultPrinter extends \PHPUnit\TextUI\ResultPrinter
|
||
|
{
|
||
|
public function __construct(
|
||
|
$out = null,
|
||
|
$verbose = false,
|
||
|
$colors = \PHPUnit\TextUI\ResultPrinter::COLOR_DEFAULT,
|
||
|
$debug = false,
|
||
|
$numberOfColumns = 80,
|
||
|
$reverse = false
|
||
|
) {
|
||
|
if ($out === null) {
|
||
|
$out = STDOUT;
|
||
|
}
|
||
|
|
||
|
parent::__construct($out, $verbose, $colors, $debug, $numberOfColumns, $reverse);
|
||
|
}
|
||
|
|
||
|
public function flush()
|
||
|
{
|
||
|
if ($this->out !== STDOUT) {
|
||
|
parent::flush();
|
||
|
}
|
||
|
}
|
||
|
}
|