100% of 448OPs |
100% of 75Lines |
0% of 1Branches |
100% of 1Paths |
Method | OPs | OPs % | Lines | Line % | Branches | Branches % | Paths | Path % |
---|---|---|---|---|---|---|---|---|
mageekguy\atoum\reports\realtime\cli\light::__construct() | 448 | 100% | 75 | 100% | 1 | 0% | 1 | 100% |
# | |
---|---|
1 |
<?php |
2 |
|
3 |
namespace mageekguy\atoum\reports\realtime\cli; |
4 |
|
5 |
use |
6 |
mageekguy\atoum, |
7 |
mageekguy\atoum\cli\prompt, |
8 |
mageekguy\atoum\cli\colorizer, |
9 |
mageekguy\atoum\reports\realtime, |
10 |
mageekguy\atoum\report\fields\test, |
11 |
mageekguy\atoum\report\fields\runner |
12 |
; |
13 |
|
14 |
class light extends realtime |
15 |
{ |
16 |
public function __construct()100% |
17 |
{ |
18 |
parent::__construct(); |
19 |
|
20 |
$firstLevelColorizer = new colorizer('1;36'); |
21 |
|
22 |
$firstLevelPrompt = new prompt('> '); |
23 |
$secondLevelPrompt = new prompt('=> ', $firstLevelColorizer); |
24 |
$thirdLevelPrompt = new prompt('==> ', $firstLevelColorizer); |
25 |
|
26 |
$this->addField(new runner\event\cli()); |
27 |
|
28 |
$resultField = new runner\result\cli(); |
29 |
$resultField |
30 |
->setSuccessColorizer(new colorizer('0;37', '42')) |
31 |
->setFailureColorizer(new colorizer('0;37', '41')) |
32 |
; |
33 |
|
34 |
$this->addField($resultField); |
35 |
|
36 |
$failureColorizer = new colorizer('0;31'); |
37 |
$failurePrompt = clone $secondLevelPrompt; |
38 |
$failurePrompt->setColorizer($failureColorizer); |
39 |
|
40 |
$failuresField = new runner\failures\cli(); |
41 |
$failuresField |
42 |
->setTitlePrompt($firstLevelPrompt) |
43 |
->setTitleColorizer($firstLevelColorizer) |
44 |
->setMethodPrompt($secondLevelPrompt) |
45 |
; |
46 |
|
47 |
$this->addField($failuresField); |
48 |
|
49 |
$outputsField = new runner\outputs\cli(); |
50 |
$outputsField |
51 |
->setTitlePrompt($firstLevelPrompt) |
52 |
->setTitleColorizer($firstLevelColorizer) |
53 |
->setMethodPrompt($secondLevelPrompt) |
54 |
; |
55 |
|
56 |
$this->addField($outputsField); |
57 |
|
58 |
$errorColorizer = new colorizer('0;33'); |
59 |
$errorMethodPrompt = clone $secondLevelPrompt; |
60 |
$errorMethodPrompt->setColorizer($errorColorizer); |
61 |
$errorPrompt = clone $thirdLevelPrompt; |
62 |
$errorPrompt->setColorizer($errorColorizer); |
63 |
|
64 |
$errorsField = new runner\errors\cli(); |
65 |
$errorsField |
66 |
->setTitlePrompt($firstLevelPrompt) |
67 |
->setTitleColorizer($errorColorizer) |
68 |
->setMethodPrompt($errorMethodPrompt) |
69 |
->setErrorPrompt($errorPrompt) |
70 |
; |
71 |
|
72 |
$this->addField($errorsField); |
73 |
|
74 |
$exceptionColorizer = new colorizer('0;35'); |
75 |
$exceptionMethodPrompt = clone $secondLevelPrompt; |
76 |
$exceptionMethodPrompt->setColorizer($exceptionColorizer); |
77 |
$exceptionPrompt = clone $thirdLevelPrompt; |
78 |
$exceptionPrompt->setColorizer($exceptionColorizer); |
79 |
|
80 |
$exceptionsField = new runner\exceptions\cli(); |
81 |
$exceptionsField |
82 |
->setTitlePrompt($firstLevelPrompt) |
83 |
->setTitleColorizer($exceptionColorizer) |
84 |
->setMethodPrompt($exceptionMethodPrompt) |
85 |
->setExceptionPrompt($exceptionPrompt) |
86 |
; |
87 |
|
88 |
$this->addField($exceptionsField); |
89 |
|
90 |
$uncompletedTestColorizer = new colorizer('0;37'); |
91 |
$uncompletedTestMethodPrompt = clone $secondLevelPrompt; |
92 |
$uncompletedTestMethodPrompt->setColorizer($uncompletedTestColorizer); |
93 |
$uncompletedTestOutputPrompt = clone $thirdLevelPrompt; |
94 |
$uncompletedTestOutputPrompt->setColorizer($uncompletedTestColorizer); |
95 |
|
96 |
$uncompletedTestField = new runner\tests\uncompleted\cli(); |
97 |
$uncompletedTestField |
98 |
->setTitlePrompt($firstLevelPrompt) |
99 |
->setTitleColorizer($uncompletedTestColorizer) |
100 |
->setMethodPrompt($uncompletedTestMethodPrompt) |
101 |
->setOutputPrompt($uncompletedTestOutputPrompt) |
102 |
; |
103 |
|
104 |
$this->addField($uncompletedTestField); |
105 |
|
106 |
$voidTestColorizer = new colorizer('0;34'); |
107 |
$voidTestMethodPrompt = clone $secondLevelPrompt; |
108 |
$voidTestMethodPrompt->setColorizer($voidTestColorizer); |
109 |
$voidTestOutputPrompt = clone $thirdLevelPrompt; |
110 |
$voidTestOutputPrompt->setColorizer($voidTestColorizer); |
111 |
|
112 |
$voidTestField = new runner\tests\void\cli(); |
113 |
$voidTestField |
114 |
->setTitlePrompt($firstLevelPrompt) |
115 |
->setTitleColorizer($voidTestColorizer) |
116 |
->setMethodPrompt($voidTestMethodPrompt) |
117 |
; |
118 |
|
119 |
$this->addField($voidTestField); |
120 |
|
121 |
$skippedTestColorizer = new colorizer('0;90'); |
122 |
$skippedTestMethodPrompt = clone $secondLevelPrompt; |
123 |
$skippedTestMethodPrompt->setColorizer($skippedTestColorizer); |
124 |
|
125 |
$skippedTestField = new runner\tests\skipped\cli(); |
126 |
$skippedTestField |
127 |
->setTitlePrompt($firstLevelPrompt) |
128 |
->setTitleColorizer($skippedTestColorizer) |
129 |
->setMethodPrompt($skippedTestMethodPrompt) |
130 |
; |
131 |
|
132 |
$this->addField($skippedTestField); |
133 |
} |
134 |
} |