Skip to content

Commit 8656ed7

Browse files
committed
Make compatible with PHPUnit 7
1 parent 993cfd3 commit 8656ed7

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
}
2020
},
2121
"require": {
22-
"php-vcr/php-vcr": "^1.3"
22+
"php-vcr/php-vcr": "^1.4"
2323
},
2424
"require-dev": {
25-
"phpunit/phpunit": "^6.2"
25+
"phpunit/phpunit": "^7"
2626
}
2727
}

src/VCRTestListener.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function __construct(array $options = array())
6262
* @param Exception $e
6363
* @param float $time
6464
*/
65-
public function addError(Test $test, \Exception $e, $time)
65+
public function addError(Test $test, \Throwable $t, float $time): void
6666
{
6767
}
6868

@@ -75,7 +75,7 @@ public function addError(Test $test, \Exception $e, $time)
7575
*
7676
* @since Method available since Release 5.1.0
7777
*/
78-
public function addWarning(Test $test, Warning $e, $time)
78+
public function addWarning(Test $test, Warning $e, float $time): void
7979
{
8080
}
8181

@@ -86,7 +86,7 @@ public function addWarning(Test $test, Warning $e, $time)
8686
* @param AssertionFailedError $e
8787
* @param float $time
8888
*/
89-
public function addFailure(Test $test, AssertionFailedError $e, $time)
89+
public function addFailure(Test $test, AssertionFailedError $e, float $time): void
9090
{
9191
}
9292

@@ -97,7 +97,7 @@ public function addFailure(Test $test, AssertionFailedError $e, $time)
9797
* @param \Exception $e
9898
* @param float $time
9999
*/
100-
public function addIncompleteTest(Test $test, \Exception $e, $time)
100+
public function addIncompleteTest(Test $test, \Throwable $e, float $time): void
101101
{
102102
}
103103

@@ -108,7 +108,7 @@ public function addIncompleteTest(Test $test, \Exception $e, $time)
108108
* @param \Exception $e
109109
* @param float $time
110110
*/
111-
public function addSkippedTest(Test $test, \Exception $e, $time)
111+
public function addSkippedTest(Test $test, \Throwable $e, float $time): void
112112
{
113113
}
114114

@@ -119,7 +119,7 @@ public function addSkippedTest(Test $test, \Exception $e, $time)
119119
* @param \Exception $e
120120
* @param float $time
121121
*/
122-
public function addRiskyTest(Test $test, \Exception $e, $time)
122+
public function addRiskyTest(Test $test, \Throwable $e, float $time): void
123123
{
124124
}
125125

@@ -130,7 +130,7 @@ public function addRiskyTest(Test $test, \Exception $e, $time)
130130
*
131131
* @return bool|null
132132
*/
133-
public function startTest(Test $test)
133+
public function startTest(Test $test): void
134134
{
135135
$class = get_class($test);
136136
$method = $test->getName(false);
@@ -152,7 +152,7 @@ public function startTest(Test $test)
152152
}
153153

154154
if (empty($cassetteName)) {
155-
return true;
155+
return;
156156
}
157157

158158
VCR::turnOn();
@@ -191,7 +191,7 @@ private static function parseDocBlock($docBlock, $tag)
191191
* @param Test $test
192192
* @param float $time
193193
*/
194-
public function endTest(Test $test, $time)
194+
public function endTest(Test $test, float $time): void
195195
{
196196
VCR::turnOff();
197197
}
@@ -201,7 +201,7 @@ public function endTest(Test $test, $time)
201201
*
202202
* @param TestSuite $suite
203203
*/
204-
public function startTestSuite(TestSuite $suite)
204+
public function startTestSuite(TestSuite $suite): void
205205
{
206206
}
207207

@@ -210,7 +210,7 @@ public function startTestSuite(TestSuite $suite)
210210
*
211211
* @param TestSuite $suite
212212
*/
213-
public function endTestSuite(TestSuite $suite)
213+
public function endTestSuite(TestSuite $suite): void
214214
{
215215
}
216216
}

0 commit comments

Comments
 (0)