@@ 60-71 (lines=12) @@ | ||
57 | * @param \Exception $exception |
|
58 | * @param float $time |
|
59 | */ |
|
60 | public function addError(Test $test, \Exception $exception, $time) |
|
61 | { |
|
62 | $this->writeCase( |
|
63 | self::STATUS_ERROR, |
|
64 | $time, |
|
65 | $this->getStackTrace($exception), |
|
66 | TestFailure::exceptionToString($exception), |
|
67 | $test |
|
68 | ); |
|
69 | ||
70 | $this->currentTestPass = false; |
|
71 | } |
|
72 | ||
73 | /** |
|
74 | * A warning occurred. |
|
@@ 80-91 (lines=12) @@ | ||
77 | * @param Warning $warning |
|
78 | * @param float $time |
|
79 | */ |
|
80 | public function addWarning(Test $test, Warning $warning, $time) |
|
81 | { |
|
82 | $this->writeCase( |
|
83 | self::STATUS_WARNING, |
|
84 | $time, |
|
85 | $this->getStackTrace($warning), |
|
86 | TestFailure::exceptionToString($warning), |
|
87 | $test |
|
88 | ); |
|
89 | ||
90 | $this->currentTestPass = false; |
|
91 | } |
|
92 | ||
93 | /** |
|
94 | * A failure occurred. |
|
@@ 100-111 (lines=12) @@ | ||
97 | * @param AssertionFailedError $error |
|
98 | * @param float $time |
|
99 | */ |
|
100 | public function addFailure(Test $test, AssertionFailedError $error, $time) |
|
101 | { |
|
102 | $this->writeCase( |
|
103 | self::STATUS_FAIL, |
|
104 | $time, |
|
105 | $this->getStackTrace($error), |
|
106 | TestFailure::exceptionToString($error), |
|
107 | $test |
|
108 | ); |
|
109 | ||
110 | $this->currentTestPass = false; |
|
111 | } |
|
112 | ||
113 | /** |
|
114 | * Incomplete test. |
|
@@ 120-131 (lines=12) @@ | ||
117 | * @param \Exception $error |
|
118 | * @param float $time |
|
119 | */ |
|
120 | public function addIncompleteTest(Test $test, \Exception $error, $time) |
|
121 | { |
|
122 | $this->writeCase( |
|
123 | self::STATUS_ERROR, |
|
124 | $time, |
|
125 | $this->getStackTrace($error), |
|
126 | self::MESSAGE_INCOMPLETE_TEST . $error->getMessage(), |
|
127 | $test |
|
128 | ); |
|
129 | ||
130 | $this->currentTestPass = false; |
|
131 | } |
|
132 | ||
133 | /** |
|
134 | * Risky test. |
|
@@ 140-151 (lines=12) @@ | ||
137 | * @param \Exception $exception |
|
138 | * @param float $time |
|
139 | */ |
|
140 | public function addRiskyTest(Test $test, \Exception $exception, $time) |
|
141 | { |
|
142 | $this->writeCase( |
|
143 | self::STATUS_ERROR, |
|
144 | $time, |
|
145 | $this->getStackTrace($exception), |
|
146 | self::MESSAGE_RISKY_TEST . $exception->getMessage(), |
|
147 | $test |
|
148 | ); |
|
149 | ||
150 | $this->currentTestPass = false; |
|
151 | } |
|
152 | ||
153 | /** |
|
154 | * Skipped test. |
|
@@ 160-171 (lines=12) @@ | ||
157 | * @param \Exception $exception |
|
158 | * @param float $time |
|
159 | */ |
|
160 | public function addSkippedTest(Test $test, \Exception $exception, $time) |
|
161 | { |
|
162 | $this->writeCase( |
|
163 | self::STATUS_ERROR, |
|
164 | $time, |
|
165 | $this->getStackTrace($exception), |
|
166 | self::MESSAGE_SKIPPED_TEST . $exception->getMessage(), |
|
167 | $test |
|
168 | ); |
|
169 | ||
170 | $this->currentTestPass = false; |
|
171 | } |
|
172 | ||
173 | /** |
|
174 | * A testsuite started. |