1
1
<?php
2
2
/**
3
- * Copyright (c) 2014-2017 Ryan Parman
3
+ * Copyright (c) 2014-2018 Ryan Parman <http://ryanparman.com>
4
4
*/
5
-
6
5
namespace Skyzyx \ResultPrinter ;
7
6
8
7
use PHPUnit \Extensions \PhptTestCase ;
@@ -38,7 +37,7 @@ class ResultPrinter extends PPrinter
38
37
/**
39
38
* {@inheritdoc}
40
39
*/
41
- protected function writeProgress ($ progress )
40
+ protected function writeProgress ($ progress ): void
42
41
{
43
42
switch ($ progress ) {
44
43
case 'E ' :
@@ -62,6 +61,7 @@ protected function writeProgress($progress)
62
61
default :
63
62
$ icon = $ progress ;
64
63
}
64
+
65
65
$ this ->column ++;
66
66
$ this ->numTestsRun ++;
67
67
@@ -78,7 +78,7 @@ protected function writeProgress($progress)
78
78
/**
79
79
* {@inheritdoc}
80
80
*/
81
- public function startTestSuite (TestSuite $ suite )
81
+ public function startTestSuite (TestSuite $ suite ): void
82
82
{
83
83
if ($ this ->numTests == -1 ) {
84
84
$ this ->numTests = count ($ suite );
@@ -90,15 +90,18 @@ public function startTestSuite(TestSuite $suite)
90
90
/**
91
91
* {@inheritdoc}
92
92
*/
93
- public function endTest (Test $ test , $ time )
93
+ public function endTest (Test $ test , $ time ): void
94
94
{
95
95
$ test_name = TestUtil::describe ($ test );
96
96
97
97
if (!empty ($ test_name )) {
98
- $ this ->test_name_status = sprintf ("%s (%s) \n" ,
99
- $ test_name ,
98
+ $ this ->test_name_status = sprintf (
99
+ "%s::%s (%s) \n" ,
100
+ $ test_name [0 ],
101
+ $ test_name [1 ],
100
102
sprintf ("%s ms " ,
101
- round ($ time * 1000 )));
103
+ round ($ time * 1000 ))
104
+ );
102
105
}
103
106
104
107
if (!$ this ->lastTestFailed ) {
@@ -123,8 +126,8 @@ public function endTest(Test $test, $time)
123
126
/**
124
127
* {@inheritdoc}
125
128
*/
126
- protected function writeProgressWithColor ($ color , $ buffer )
129
+ protected function writeProgressWithColor ($ color , $ buffer ): void
127
130
{
128
- return $ this ->writeProgress ($ buffer );
131
+ $ this ->writeProgress ($ buffer );
129
132
}
130
133
}
0 commit comments