Skip to content

Commit 55fab78

Browse files
authored
Merge pull request #2 from php5friends/development
Support PHP 7.1
2 parents 58737d7 + 6f89717 commit 55fab78

File tree

11 files changed

+69
-66
lines changed

11 files changed

+69
-66
lines changed

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ php:
55
- 5.4
66
- 5.5
77
- 5.6
8+
- "7.0"
9+
- "7.1"
810

911
env:
1012
matrix:

src/Extensions/TicketListener.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ abstract class PHPUnit_Extensions_TicketListener implements PHPUnit_Framework_Te
2929
* An error occurred.
3030
*
3131
* @param PHPUnit_Framework_Test $test
32-
* @param Exception $e
32+
* @param \Exception|\Throwable $e
3333
* @param float $time
3434
*/
35-
public function addError(PHPUnit_Framework_Test $test, Exception $e, $time)
35+
public function addError(PHPUnit_Framework_Test $test, $e, $time)
3636
{
3737
}
3838

@@ -51,36 +51,36 @@ public function addFailure(PHPUnit_Framework_Test $test, PHPUnit_Framework_Asser
5151
* Incomplete test.
5252
*
5353
* @param PHPUnit_Framework_Test $test
54-
* @param Exception $e
54+
* @param \Exception|\Throwable $e
5555
* @param float $time
5656
*/
57-
public function addIncompleteTest(PHPUnit_Framework_Test $test, Exception $e, $time)
57+
public function addIncompleteTest(PHPUnit_Framework_Test $test, $e, $time)
5858
{
5959
}
6060

6161
/**
6262
* Risky test.
6363
*
6464
* @param PHPUnit_Framework_Test $test
65-
* @param Exception $e
65+
* @param \Exception|\Throwable $e
6666
* @param float $time
6767
*
6868
* @since Method available since Release 4.0.0
6969
*/
70-
public function addRiskyTest(PHPUnit_Framework_Test $test, Exception $e, $time)
70+
public function addRiskyTest(PHPUnit_Framework_Test $test, $e, $time)
7171
{
7272
}
7373

7474
/**
7575
* Skipped test.
7676
*
7777
* @param PHPUnit_Framework_Test $test
78-
* @param Exception $e
78+
* @param \Exception|\Throwable $e
7979
* @param float $time
8080
*
8181
* @since Method available since Release 3.0.0
8282
*/
83-
public function addSkippedTest(PHPUnit_Framework_Test $test, Exception $e, $time)
83+
public function addSkippedTest(PHPUnit_Framework_Test $test, $e, $time)
8484
{
8585
}
8686

src/Framework/BaseTestListener.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,23 @@
1717
*/
1818
abstract class PHPUnit_Framework_BaseTestListener implements PHPUnit_Framework_TestListener
1919
{
20-
public function addError(PHPUnit_Framework_Test $test, Exception $e, $time)
20+
public function addError(PHPUnit_Framework_Test $test, $e, $time)
2121
{
2222
}
2323

2424
public function addFailure(PHPUnit_Framework_Test $test, PHPUnit_Framework_AssertionFailedError $e, $time)
2525
{
2626
}
2727

28-
public function addIncompleteTest(PHPUnit_Framework_Test $test, Exception $e, $time)
28+
public function addIncompleteTest(PHPUnit_Framework_Test $test, $e, $time)
2929
{
3030
}
3131

32-
public function addRiskyTest(PHPUnit_Framework_Test $test, Exception $e, $time)
32+
public function addRiskyTest(PHPUnit_Framework_Test $test, $e, $time)
3333
{
3434
}
3535

36-
public function addSkippedTest(PHPUnit_Framework_Test $test, Exception $e, $time)
36+
public function addSkippedTest(PHPUnit_Framework_Test $test, $e, $time)
3737
{
3838
}
3939

src/Framework/TestFailure.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ class PHPUnit_Framework_TestFailure
3434
* Constructs a TestFailure with the given test and exception.
3535
*
3636
* @param PHPUnit_Framework_Test $failedTest
37-
* @param Exception $thrownException
37+
* @param \Exception|\Throwable $thrownException
3838
*/
39-
public function __construct(PHPUnit_Framework_Test $failedTest, Exception $thrownException)
39+
public function __construct(PHPUnit_Framework_Test $failedTest, $thrownException)
4040
{
4141
if ($failedTest instanceof PHPUnit_Framework_SelfDescribing) {
4242
$this->testName = $failedTest->toString();

src/Framework/TestListener.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ interface PHPUnit_Framework_TestListener
1919
* An error occurred.
2020
*
2121
* @param PHPUnit_Framework_Test $test
22-
* @param Exception $e
22+
* @param \Exception|\Throwable $e
2323
* @param float $time
2424
*/
25-
public function addError(PHPUnit_Framework_Test $test, Exception $e, $time);
25+
public function addError(PHPUnit_Framework_Test $test, $e, $time);
2626

2727
/**
2828
* A failure occurred.
@@ -37,32 +37,32 @@ public function addFailure(PHPUnit_Framework_Test $test, PHPUnit_Framework_Asser
3737
* Incomplete test.
3838
*
3939
* @param PHPUnit_Framework_Test $test
40-
* @param Exception $e
40+
* @param \Exception|\Throwable $e
4141
* @param float $time
4242
*/
43-
public function addIncompleteTest(PHPUnit_Framework_Test $test, Exception $e, $time);
43+
public function addIncompleteTest(PHPUnit_Framework_Test $test, $e, $time);
4444

4545
/**
4646
* Risky test.
4747
*
4848
* @param PHPUnit_Framework_Test $test
49-
* @param Exception $e
49+
* @param \Exception|\Throwable $e
5050
* @param float $time
5151
*
5252
* @since Method available since Release 4.0.0
5353
*/
54-
public function addRiskyTest(PHPUnit_Framework_Test $test, Exception $e, $time);
54+
public function addRiskyTest(PHPUnit_Framework_Test $test, $e, $time);
5555

5656
/**
5757
* Skipped test.
5858
*
5959
* @param PHPUnit_Framework_Test $test
60-
* @param Exception $e
60+
* @param \Exception|\Throwable $e
6161
* @param float $time
6262
*
6363
* @since Method available since Release 3.0.0
6464
*/
65-
public function addSkippedTest(PHPUnit_Framework_Test $test, Exception $e, $time);
65+
public function addSkippedTest(PHPUnit_Framework_Test $test, $e, $time);
6666

6767
/**
6868
* A test suite started.

src/TextUI/ResultPrinter.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -388,10 +388,10 @@ public function printWaitPrompt()
388388
* An error occurred.
389389
*
390390
* @param PHPUnit_Framework_Test $test
391-
* @param Exception $e
391+
* @param \Exception|\Throwable $e
392392
* @param float $time
393393
*/
394-
public function addError(PHPUnit_Framework_Test $test, Exception $e, $time)
394+
public function addError(PHPUnit_Framework_Test $test, $e, $time)
395395
{
396396
$this->writeProgressWithColor('fg-red, bold', 'E');
397397
$this->lastTestFailed = true;
@@ -414,10 +414,10 @@ public function addFailure(PHPUnit_Framework_Test $test, PHPUnit_Framework_Asser
414414
* Incomplete test.
415415
*
416416
* @param PHPUnit_Framework_Test $test
417-
* @param Exception $e
417+
* @param \Exception|\Throwable $e
418418
* @param float $time
419419
*/
420-
public function addIncompleteTest(PHPUnit_Framework_Test $test, Exception $e, $time)
420+
public function addIncompleteTest(PHPUnit_Framework_Test $test, $e, $time)
421421
{
422422
$this->writeProgressWithColor('fg-yellow, bold', 'I');
423423
$this->lastTestFailed = true;
@@ -427,12 +427,12 @@ public function addIncompleteTest(PHPUnit_Framework_Test $test, Exception $e, $t
427427
* Risky test.
428428
*
429429
* @param PHPUnit_Framework_Test $test
430-
* @param Exception $e
430+
* @param \Exception|\Throwable $e
431431
* @param float $time
432432
*
433433
* @since Method available since Release 4.0.0
434434
*/
435-
public function addRiskyTest(PHPUnit_Framework_Test $test, Exception $e, $time)
435+
public function addRiskyTest(PHPUnit_Framework_Test $test, $e, $time)
436436
{
437437
$this->writeProgressWithColor('fg-yellow, bold', 'R');
438438
$this->lastTestFailed = true;
@@ -442,12 +442,12 @@ public function addRiskyTest(PHPUnit_Framework_Test $test, Exception $e, $time)
442442
* Skipped test.
443443
*
444444
* @param PHPUnit_Framework_Test $test
445-
* @param Exception $e
445+
* @param \Exception|\Throwable $e
446446
* @param float $time
447447
*
448448
* @since Method available since Release 3.0.0
449449
*/
450-
public function addSkippedTest(PHPUnit_Framework_Test $test, Exception $e, $time)
450+
public function addSkippedTest(PHPUnit_Framework_Test $test, $e, $time)
451451
{
452452
$this->writeProgressWithColor('fg-cyan, bold', 'S');
453453
$this->lastTestFailed = true;

src/Util/Log/JSON.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ class PHPUnit_Util_Log_JSON extends PHPUnit_Util_Printer implements PHPUnit_Fram
3434
* An error occurred.
3535
*
3636
* @param PHPUnit_Framework_Test $test
37-
* @param Exception $e
37+
* @param \Exception|\Throwable $e
3838
* @param float $time
3939
*/
40-
public function addError(PHPUnit_Framework_Test $test, Exception $e, $time)
40+
public function addError(PHPUnit_Framework_Test $test, $e, $time)
4141
{
4242
$this->writeCase(
4343
'error',
@@ -74,10 +74,10 @@ public function addFailure(PHPUnit_Framework_Test $test, PHPUnit_Framework_Asser
7474
* Incomplete test.
7575
*
7676
* @param PHPUnit_Framework_Test $test
77-
* @param Exception $e
77+
* @param \Exception|\Throwable $e
7878
* @param float $time
7979
*/
80-
public function addIncompleteTest(PHPUnit_Framework_Test $test, Exception $e, $time)
80+
public function addIncompleteTest(PHPUnit_Framework_Test $test, $e, $time)
8181
{
8282
$this->writeCase(
8383
'error',
@@ -94,12 +94,12 @@ public function addIncompleteTest(PHPUnit_Framework_Test $test, Exception $e, $t
9494
* Risky test.
9595
*
9696
* @param PHPUnit_Framework_Test $test
97-
* @param Exception $e
97+
* @param \Exception|\Throwable $e
9898
* @param float $time
9999
*
100100
* @since Method available since Release 4.0.0
101101
*/
102-
public function addRiskyTest(PHPUnit_Framework_Test $test, Exception $e, $time)
102+
public function addRiskyTest(PHPUnit_Framework_Test $test, $e, $time)
103103
{
104104
$this->writeCase(
105105
'error',
@@ -116,10 +116,10 @@ public function addRiskyTest(PHPUnit_Framework_Test $test, Exception $e, $time)
116116
* Skipped test.
117117
*
118118
* @param PHPUnit_Framework_Test $test
119-
* @param Exception $e
119+
* @param \Exception|\Throwable $e
120120
* @param float $time
121121
*/
122-
public function addSkippedTest(PHPUnit_Framework_Test $test, Exception $e, $time)
122+
public function addSkippedTest(PHPUnit_Framework_Test $test, $e, $time)
123123
{
124124
$this->writeCase(
125125
'error',

src/Util/Log/JUnit.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,10 @@ public function flush()
117117
* An error occurred.
118118
*
119119
* @param PHPUnit_Framework_Test $test
120-
* @param Exception $e
120+
* @param \Exception|\Throwable $e
121121
* @param float $time
122122
*/
123-
public function addError(PHPUnit_Framework_Test $test, Exception $e, $time)
123+
public function addError(PHPUnit_Framework_Test $test, $e, $time)
124124
{
125125
if ($this->currentTestCase === null) {
126126
return;
@@ -192,10 +192,10 @@ public function addFailure(PHPUnit_Framework_Test $test, PHPUnit_Framework_Asser
192192
* Incomplete test.
193193
*
194194
* @param PHPUnit_Framework_Test $test
195-
* @param Exception $e
195+
* @param \Exception|\Throwable $e
196196
* @param float $time
197197
*/
198-
public function addIncompleteTest(PHPUnit_Framework_Test $test, Exception $e, $time)
198+
public function addIncompleteTest(PHPUnit_Framework_Test $test, $e, $time)
199199
{
200200
if ($this->logIncompleteSkipped && $this->currentTestCase !== null) {
201201
$error = $this->document->createElement(
@@ -220,12 +220,12 @@ public function addIncompleteTest(PHPUnit_Framework_Test $test, Exception $e, $t
220220
* Risky test.
221221
*
222222
* @param PHPUnit_Framework_Test $test
223-
* @param Exception $e
223+
* @param \Exception|\Throwable $e
224224
* @param float $time
225225
*
226226
* @since Method available since Release 4.0.0
227227
*/
228-
public function addRiskyTest(PHPUnit_Framework_Test $test, Exception $e, $time)
228+
public function addRiskyTest(PHPUnit_Framework_Test $test, $e, $time)
229229
{
230230
if ($this->logIncompleteSkipped && $this->currentTestCase !== null) {
231231
$error = $this->document->createElement(
@@ -250,12 +250,12 @@ public function addRiskyTest(PHPUnit_Framework_Test $test, Exception $e, $time)
250250
* Skipped test.
251251
*
252252
* @param PHPUnit_Framework_Test $test
253-
* @param Exception $e
253+
* @param \Exception|\Throwable $e
254254
* @param float $time
255255
*
256256
* @since Method available since Release 3.0.0
257257
*/
258-
public function addSkippedTest(PHPUnit_Framework_Test $test, Exception $e, $time)
258+
public function addSkippedTest(PHPUnit_Framework_Test $test, $e, $time)
259259
{
260260
if ($this->logIncompleteSkipped && $this->currentTestCase !== null) {
261261
$error = $this->document->createElement(

src/Util/Log/TAP.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ public function __construct($out = null)
5050
* An error occurred.
5151
*
5252
* @param PHPUnit_Framework_Test $test
53-
* @param Exception $e
53+
* @param \Exception|\Throwable $e
5454
* @param float $time
5555
*/
56-
public function addError(PHPUnit_Framework_Test $test, Exception $e, $time)
56+
public function addError(PHPUnit_Framework_Test $test, $e, $time)
5757
{
5858
$this->writeNotOk($test, 'Error');
5959
}
@@ -104,10 +104,10 @@ public function addFailure(PHPUnit_Framework_Test $test, PHPUnit_Framework_Asser
104104
* Incomplete test.
105105
*
106106
* @param PHPUnit_Framework_Test $test
107-
* @param Exception $e
107+
* @param \Exception|\Throwable $e
108108
* @param float $time
109109
*/
110-
public function addIncompleteTest(PHPUnit_Framework_Test $test, Exception $e, $time)
110+
public function addIncompleteTest(PHPUnit_Framework_Test $test, $e, $time)
111111
{
112112
$this->writeNotOk($test, '', 'TODO Incomplete Test');
113113
}
@@ -116,12 +116,12 @@ public function addIncompleteTest(PHPUnit_Framework_Test $test, Exception $e, $t
116116
* Risky test.
117117
*
118118
* @param PHPUnit_Framework_Test $test
119-
* @param Exception $e
119+
* @param \Exception|\Throwable $e
120120
* @param float $time
121121
*
122122
* @since Method available since Release 4.0.0
123123
*/
124-
public function addRiskyTest(PHPUnit_Framework_Test $test, Exception $e, $time)
124+
public function addRiskyTest(PHPUnit_Framework_Test $test, $e, $time)
125125
{
126126
$this->write(
127127
sprintf(
@@ -138,12 +138,12 @@ public function addRiskyTest(PHPUnit_Framework_Test $test, Exception $e, $time)
138138
* Skipped test.
139139
*
140140
* @param PHPUnit_Framework_Test $test
141-
* @param Exception $e
141+
* @param \Exception|\Throwable $e
142142
* @param float $time
143143
*
144144
* @since Method available since Release 3.0.0
145145
*/
146-
public function addSkippedTest(PHPUnit_Framework_Test $test, Exception $e, $time)
146+
public function addSkippedTest(PHPUnit_Framework_Test $test, $e, $time)
147147
{
148148
$this->write(
149149
sprintf(

0 commit comments

Comments
 (0)