guard-phpunit2 0.2.6 → 0.2.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/guard/phpunit/formatters/PHPUnit-Progress/PHPUnit/Extensions/Progress/ResultPrinter.php +1 -1
- data/lib/guard/phpunit2/logreader.rb +114 -0
- data/lib/guard/phpunit2/realtime_runner.rb +54 -0
- data/lib/guard/phpunit2/runner.rb +26 -9
- data/lib/guard/phpunit2/version.rb +1 -1
- data/lib/guard/phpunit2.rb +10 -3
- data/spec/fixtures/failureSampleTest.php +11 -0
- data/spec/fixtures/mixedSampleTest.php +23 -0
- data/spec/fixtures/passingSampleTest.php +11 -0
- data/spec/fixtures/results/failing-json.txt +53 -0
- data/spec/fixtures/results/mixed-json.txt +110 -0
- data/spec/fixtures/results/multiple-test-cases-json.txt +319 -0
- data/spec/fixtures/results/passing-json.txt +35 -0
- data/spec/fixtures/results/skipped_and_incomplete-json.txt +77 -0
- data/spec/fixtures/skippedSampleTest.php +15 -0
- data/spec/guard/phpunit2/logreader_spec.rb +62 -0
- data/spec/guard/phpunit2/realtime_runner_spec.rb +167 -0
- data/spec/guard/phpunit2_spec.rb +29 -1
- data.tar.gz.sig +0 -0
- metadata +37 -14
- metadata.gz.sig +0 -0
@@ -0,0 +1,319 @@
|
|
1
|
+
{
|
2
|
+
"event": "suiteStart",
|
3
|
+
"suite": ".",
|
4
|
+
"tests": 14
|
5
|
+
}{
|
6
|
+
"event": "suiteStart",
|
7
|
+
"suite": "Fail2",
|
8
|
+
"tests": 2
|
9
|
+
}{
|
10
|
+
"event": "testStart",
|
11
|
+
"suite": "Fail2",
|
12
|
+
"test": "Fail2::testTrueIsTrue"
|
13
|
+
}{
|
14
|
+
"event": "test",
|
15
|
+
"suite": "Fail2",
|
16
|
+
"test": "Fail2::testTrueIsTrue",
|
17
|
+
"status": "fail",
|
18
|
+
"time": 0.0017910003662109,
|
19
|
+
"trace": [
|
20
|
+
{
|
21
|
+
"file": "\/Users\/mburke\/personal\/guard-phpunit2\/spec\/fixtures\/failureSampleTest.php",
|
22
|
+
"line": 5,
|
23
|
+
"function": "assertTrue",
|
24
|
+
"class": "PHPUnit_Framework_Assert",
|
25
|
+
"type": "::",
|
26
|
+
"args": [
|
27
|
+
false
|
28
|
+
]
|
29
|
+
}
|
30
|
+
],
|
31
|
+
"message": "Failed asserting that false is true.",
|
32
|
+
"output": ""
|
33
|
+
}{
|
34
|
+
"event": "testStart",
|
35
|
+
"suite": "Fail2",
|
36
|
+
"test": "Fail2::testFalseIsFalse"
|
37
|
+
}{
|
38
|
+
"event": "test",
|
39
|
+
"suite": "Fail2",
|
40
|
+
"test": "Fail2::testFalseIsFalse",
|
41
|
+
"status": "fail",
|
42
|
+
"time": 0.00045895576477051,
|
43
|
+
"trace": [
|
44
|
+
{
|
45
|
+
"file": "\/Users\/mburke\/personal\/guard-phpunit2\/spec\/fixtures\/failureSampleTest.php",
|
46
|
+
"line": 9,
|
47
|
+
"function": "assertFalse",
|
48
|
+
"class": "PHPUnit_Framework_Assert",
|
49
|
+
"type": "::",
|
50
|
+
"args": [
|
51
|
+
true
|
52
|
+
]
|
53
|
+
}
|
54
|
+
],
|
55
|
+
"message": "Failed asserting that true is false.",
|
56
|
+
"output": ""
|
57
|
+
}{
|
58
|
+
"event": "suiteStart",
|
59
|
+
"suite": "Mixed",
|
60
|
+
"tests": 5
|
61
|
+
}{
|
62
|
+
"event": "testStart",
|
63
|
+
"suite": "Mixed",
|
64
|
+
"test": "Mixed::testPass"
|
65
|
+
}{
|
66
|
+
"event": "test",
|
67
|
+
"suite": "Mixed",
|
68
|
+
"test": "Mixed::testPass",
|
69
|
+
"status": "pass",
|
70
|
+
"time": 0.00029397010803223,
|
71
|
+
"trace": [
|
72
|
+
|
73
|
+
],
|
74
|
+
"message": "",
|
75
|
+
"output": ""
|
76
|
+
}{
|
77
|
+
"event": "testStart",
|
78
|
+
"suite": "Mixed",
|
79
|
+
"test": "Mixed::testFail"
|
80
|
+
}{
|
81
|
+
"event": "test",
|
82
|
+
"suite": "Mixed",
|
83
|
+
"test": "Mixed::testFail",
|
84
|
+
"status": "fail",
|
85
|
+
"time": 0.00030398368835449,
|
86
|
+
"trace": [
|
87
|
+
{
|
88
|
+
"file": "\/Users\/mburke\/personal\/guard-phpunit2\/spec\/fixtures\/mixedSampleTest.php",
|
89
|
+
"line": 9,
|
90
|
+
"function": "assertTrue",
|
91
|
+
"class": "PHPUnit_Framework_Assert",
|
92
|
+
"type": "::",
|
93
|
+
"args": [
|
94
|
+
false
|
95
|
+
]
|
96
|
+
}
|
97
|
+
],
|
98
|
+
"message": "Failed asserting that false is true.",
|
99
|
+
"output": ""
|
100
|
+
}{
|
101
|
+
"event": "testStart",
|
102
|
+
"suite": "Mixed",
|
103
|
+
"test": "Mixed::testError"
|
104
|
+
}{
|
105
|
+
"event": "test",
|
106
|
+
"suite": "Mixed",
|
107
|
+
"test": "Mixed::testError",
|
108
|
+
"status": "error",
|
109
|
+
"time": 0.00028800964355469,
|
110
|
+
"trace": [
|
111
|
+
{
|
112
|
+
"file": "\/Users\/mburke\/personal\/guard-phpunit2\/spec\/fixtures\/mixedSampleTest.php",
|
113
|
+
"line": 13
|
114
|
+
}
|
115
|
+
],
|
116
|
+
"message": "Broked!",
|
117
|
+
"output": ""
|
118
|
+
}{
|
119
|
+
"event": "testStart",
|
120
|
+
"suite": "Mixed",
|
121
|
+
"test": "Mixed::testSkipped"
|
122
|
+
}{
|
123
|
+
"event": "test",
|
124
|
+
"suite": "Mixed",
|
125
|
+
"test": "Mixed::testSkipped",
|
126
|
+
"status": "error",
|
127
|
+
"time": 0.0005030632019043,
|
128
|
+
"trace": [
|
129
|
+
{
|
130
|
+
"file": "\/Users\/mburke\/personal\/guard-phpunit2\/spec\/fixtures\/mixedSampleTest.php",
|
131
|
+
"line": 17,
|
132
|
+
"function": "markTestSkipped",
|
133
|
+
"class": "PHPUnit_Framework_Assert",
|
134
|
+
"type": "::",
|
135
|
+
"args": [
|
136
|
+
|
137
|
+
]
|
138
|
+
}
|
139
|
+
],
|
140
|
+
"message": "Skipped Test: ",
|
141
|
+
"output": ""
|
142
|
+
}{
|
143
|
+
"event": "testStart",
|
144
|
+
"suite": "Mixed",
|
145
|
+
"test": "Mixed::testIncomplete"
|
146
|
+
}{
|
147
|
+
"event": "test",
|
148
|
+
"suite": "Mixed",
|
149
|
+
"test": "Mixed::testIncomplete",
|
150
|
+
"status": "error",
|
151
|
+
"time": 0.00046014785766602,
|
152
|
+
"trace": [
|
153
|
+
{
|
154
|
+
"file": "\/Users\/mburke\/personal\/guard-phpunit2\/spec\/fixtures\/mixedSampleTest.php",
|
155
|
+
"line": 21,
|
156
|
+
"function": "markTestIncomplete",
|
157
|
+
"class": "PHPUnit_Framework_Assert",
|
158
|
+
"type": "::",
|
159
|
+
"args": [
|
160
|
+
|
161
|
+
]
|
162
|
+
}
|
163
|
+
],
|
164
|
+
"message": "Incomplete Test: ",
|
165
|
+
"output": ""
|
166
|
+
}{
|
167
|
+
"event": "suiteStart",
|
168
|
+
"suite": "Pass2",
|
169
|
+
"tests": 2
|
170
|
+
}{
|
171
|
+
"event": "testStart",
|
172
|
+
"suite": "Pass2",
|
173
|
+
"test": "Pass2::testTrueIsTrue"
|
174
|
+
}{
|
175
|
+
"event": "test",
|
176
|
+
"suite": "Pass2",
|
177
|
+
"test": "Pass2::testTrueIsTrue",
|
178
|
+
"status": "pass",
|
179
|
+
"time": 0.00026488304138184,
|
180
|
+
"trace": [
|
181
|
+
|
182
|
+
],
|
183
|
+
"message": "",
|
184
|
+
"output": ""
|
185
|
+
}{
|
186
|
+
"event": "testStart",
|
187
|
+
"suite": "Pass2",
|
188
|
+
"test": "Pass2::testFalseIsFalse"
|
189
|
+
}{
|
190
|
+
"event": "test",
|
191
|
+
"suite": "Pass2",
|
192
|
+
"test": "Pass2::testFalseIsFalse",
|
193
|
+
"status": "pass",
|
194
|
+
"time": 0.00026392936706543,
|
195
|
+
"trace": [
|
196
|
+
|
197
|
+
],
|
198
|
+
"message": "",
|
199
|
+
"output": ""
|
200
|
+
}{
|
201
|
+
"event": "suiteStart",
|
202
|
+
"suite": "sampleTest",
|
203
|
+
"tests": 2
|
204
|
+
}{
|
205
|
+
"event": "testStart",
|
206
|
+
"suite": "sampleTest",
|
207
|
+
"test": "sampleTest::testTrueIsTrue"
|
208
|
+
}{
|
209
|
+
"event": "test",
|
210
|
+
"suite": "sampleTest",
|
211
|
+
"test": "sampleTest::testTrueIsTrue",
|
212
|
+
"status": "pass",
|
213
|
+
"time": 0.000244140625,
|
214
|
+
"trace": [
|
215
|
+
|
216
|
+
],
|
217
|
+
"message": "",
|
218
|
+
"output": ""
|
219
|
+
}{
|
220
|
+
"event": "testStart",
|
221
|
+
"suite": "sampleTest",
|
222
|
+
"test": "sampleTest::testTrueIsFalse"
|
223
|
+
}{
|
224
|
+
"event": "test",
|
225
|
+
"suite": "sampleTest",
|
226
|
+
"test": "sampleTest::testTrueIsFalse",
|
227
|
+
"status": "fail",
|
228
|
+
"time": 0.00027990341186523,
|
229
|
+
"trace": [
|
230
|
+
{
|
231
|
+
"file": "\/Users\/mburke\/personal\/guard-phpunit2\/spec\/fixtures\/sampleTest.php",
|
232
|
+
"line": 10,
|
233
|
+
"function": "assertTrue",
|
234
|
+
"class": "PHPUnit_Framework_Assert",
|
235
|
+
"type": "::",
|
236
|
+
"args": [
|
237
|
+
false
|
238
|
+
]
|
239
|
+
}
|
240
|
+
],
|
241
|
+
"message": "Failed asserting that false is true.",
|
242
|
+
"output": ""
|
243
|
+
}{
|
244
|
+
"event": "suiteStart",
|
245
|
+
"suite": "Skipped",
|
246
|
+
"tests": 3
|
247
|
+
}{
|
248
|
+
"event": "testStart",
|
249
|
+
"suite": "Skipped",
|
250
|
+
"test": "Skipped::testSkipped"
|
251
|
+
}{
|
252
|
+
"event": "test",
|
253
|
+
"suite": "Skipped",
|
254
|
+
"test": "Skipped::testSkipped",
|
255
|
+
"status": "error",
|
256
|
+
"time": 0.00028705596923828,
|
257
|
+
"trace": [
|
258
|
+
{
|
259
|
+
"file": "\/Users\/mburke\/personal\/guard-phpunit2\/spec\/fixtures\/skippedSampleTest.php",
|
260
|
+
"line": 5,
|
261
|
+
"function": "markTestSkipped",
|
262
|
+
"class": "PHPUnit_Framework_Assert",
|
263
|
+
"type": "::",
|
264
|
+
"args": [
|
265
|
+
|
266
|
+
]
|
267
|
+
}
|
268
|
+
],
|
269
|
+
"message": "Skipped Test: ",
|
270
|
+
"output": ""
|
271
|
+
}{
|
272
|
+
"event": "testStart",
|
273
|
+
"suite": "Skipped",
|
274
|
+
"test": "Skipped::testIncomplete"
|
275
|
+
}{
|
276
|
+
"event": "test",
|
277
|
+
"suite": "Skipped",
|
278
|
+
"test": "Skipped::testIncomplete",
|
279
|
+
"status": "error",
|
280
|
+
"time": 0.00029921531677246,
|
281
|
+
"trace": [
|
282
|
+
{
|
283
|
+
"file": "\/Users\/mburke\/personal\/guard-phpunit2\/spec\/fixtures\/skippedSampleTest.php",
|
284
|
+
"line": 9,
|
285
|
+
"function": "markTestIncomplete",
|
286
|
+
"class": "PHPUnit_Framework_Assert",
|
287
|
+
"type": "::",
|
288
|
+
"args": [
|
289
|
+
|
290
|
+
]
|
291
|
+
}
|
292
|
+
],
|
293
|
+
"message": "Incomplete Test: ",
|
294
|
+
"output": ""
|
295
|
+
}{
|
296
|
+
"event": "testStart",
|
297
|
+
"suite": "Skipped",
|
298
|
+
"test": "Skipped::testNumberThree"
|
299
|
+
}{
|
300
|
+
"event": "test",
|
301
|
+
"suite": "Skipped",
|
302
|
+
"test": "Skipped::testNumberThree",
|
303
|
+
"status": "error",
|
304
|
+
"time": 0.00026488304138184,
|
305
|
+
"trace": [
|
306
|
+
{
|
307
|
+
"file": "\/Users\/mburke\/personal\/guard-phpunit2\/spec\/fixtures\/skippedSampleTest.php",
|
308
|
+
"line": 13,
|
309
|
+
"function": "markTestSkipped",
|
310
|
+
"class": "PHPUnit_Framework_Assert",
|
311
|
+
"type": "::",
|
312
|
+
"args": [
|
313
|
+
|
314
|
+
]
|
315
|
+
}
|
316
|
+
],
|
317
|
+
"message": "Skipped Test: ",
|
318
|
+
"output": ""
|
319
|
+
}
|
@@ -0,0 +1,35 @@
|
|
1
|
+
{
|
2
|
+
"event": "suiteStart",
|
3
|
+
"suite": "Pass2",
|
4
|
+
"tests": 2
|
5
|
+
}{
|
6
|
+
"event": "testStart",
|
7
|
+
"suite": "Pass2",
|
8
|
+
"test": "Pass2::testTrueIsTrue"
|
9
|
+
}{
|
10
|
+
"event": "test",
|
11
|
+
"suite": "Pass2",
|
12
|
+
"test": "Pass2::testTrueIsTrue",
|
13
|
+
"status": "pass",
|
14
|
+
"time": 0.0012128353118896,
|
15
|
+
"trace": [
|
16
|
+
|
17
|
+
],
|
18
|
+
"message": "",
|
19
|
+
"output": ""
|
20
|
+
}{
|
21
|
+
"event": "testStart",
|
22
|
+
"suite": "Pass2",
|
23
|
+
"test": "Pass2::testFalseIsFalse"
|
24
|
+
}{
|
25
|
+
"event": "test",
|
26
|
+
"suite": "Pass2",
|
27
|
+
"test": "Pass2::testFalseIsFalse",
|
28
|
+
"status": "pass",
|
29
|
+
"time": 0.00036501884460449,
|
30
|
+
"trace": [
|
31
|
+
|
32
|
+
],
|
33
|
+
"message": "",
|
34
|
+
"output": ""
|
35
|
+
}
|
@@ -0,0 +1,77 @@
|
|
1
|
+
{
|
2
|
+
"event": "suiteStart",
|
3
|
+
"suite": "Skipped",
|
4
|
+
"tests": 3
|
5
|
+
}{
|
6
|
+
"event": "testStart",
|
7
|
+
"suite": "Skipped",
|
8
|
+
"test": "Skipped::testSkipped"
|
9
|
+
}{
|
10
|
+
"event": "test",
|
11
|
+
"suite": "Skipped",
|
12
|
+
"test": "Skipped::testSkipped",
|
13
|
+
"status": "error",
|
14
|
+
"time": 0.0013699531555176,
|
15
|
+
"trace": [
|
16
|
+
{
|
17
|
+
"file": "\/Users\/mburke\/personal\/guard-phpunit2\/spec\/fixtures\/skipped.php",
|
18
|
+
"line": 5,
|
19
|
+
"function": "markTestSkipped",
|
20
|
+
"class": "PHPUnit_Framework_Assert",
|
21
|
+
"type": "::",
|
22
|
+
"args": [
|
23
|
+
|
24
|
+
]
|
25
|
+
}
|
26
|
+
],
|
27
|
+
"message": "Skipped Test: ",
|
28
|
+
"output": ""
|
29
|
+
}{
|
30
|
+
"event": "testStart",
|
31
|
+
"suite": "Skipped",
|
32
|
+
"test": "Skipped::testIncomplete"
|
33
|
+
}{
|
34
|
+
"event": "test",
|
35
|
+
"suite": "Skipped",
|
36
|
+
"test": "Skipped::testIncomplete",
|
37
|
+
"status": "error",
|
38
|
+
"time": 0.00050210952758789,
|
39
|
+
"trace": [
|
40
|
+
{
|
41
|
+
"file": "\/Users\/mburke\/personal\/guard-phpunit2\/spec\/fixtures\/skipped.php",
|
42
|
+
"line": 9,
|
43
|
+
"function": "markTestIncomplete",
|
44
|
+
"class": "PHPUnit_Framework_Assert",
|
45
|
+
"type": "::",
|
46
|
+
"args": [
|
47
|
+
|
48
|
+
]
|
49
|
+
}
|
50
|
+
],
|
51
|
+
"message": "Incomplete Test: ",
|
52
|
+
"output": ""
|
53
|
+
}{
|
54
|
+
"event": "testStart",
|
55
|
+
"suite": "Skipped",
|
56
|
+
"test": "Skipped::testNumberThree"
|
57
|
+
}{
|
58
|
+
"event": "test",
|
59
|
+
"suite": "Skipped",
|
60
|
+
"test": "Skipped::testNumberThree",
|
61
|
+
"status": "error",
|
62
|
+
"time": 0.00030303001403809,
|
63
|
+
"trace": [
|
64
|
+
{
|
65
|
+
"file": "\/Users\/mburke\/personal\/guard-phpunit2\/spec\/fixtures\/skipped.php",
|
66
|
+
"line": 13,
|
67
|
+
"function": "markTestSkipped",
|
68
|
+
"class": "PHPUnit_Framework_Assert",
|
69
|
+
"type": "::",
|
70
|
+
"args": [
|
71
|
+
|
72
|
+
]
|
73
|
+
}
|
74
|
+
],
|
75
|
+
"message": "Skipped Test: ",
|
76
|
+
"output": ""
|
77
|
+
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<?php
|
2
|
+
|
3
|
+
class Skipped extends PHPUnit_Framework_TestCase {
|
4
|
+
public function testSkipped() {
|
5
|
+
$this->markTestSkipped();
|
6
|
+
}
|
7
|
+
|
8
|
+
public function testIncomplete() {
|
9
|
+
$this->markTestIncomplete();
|
10
|
+
}
|
11
|
+
|
12
|
+
public function testNumberThree() {
|
13
|
+
$this->markTestSkipped();
|
14
|
+
}
|
15
|
+
}
|