forked from yiisoft/yii2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathResultPrinter.php
38 lines (34 loc) · 963 Bytes
/
ResultPrinter.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?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();
}
}
}