Skip to content

Make compatible with PHPUnit 7 #26

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ language: php
matrix:
fast_finish: true
include:
- php: 7.0
- php: 7.1
- env: COMPOSER_FLAGS="--prefer-lowest"
php: 7.1
- php: 7.2

before_install:
- composer self-update
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
}
},
"require": {
"php-vcr/php-vcr": "^1.3"
"php-vcr/php-vcr": "^1.4"
},
"require-dev": {
"phpunit/phpunit": "^6.2"
"phpunit/phpunit": "^7"
}
}
22 changes: 11 additions & 11 deletions src/VCRTestListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function __construct(array $options = array())
* @param Exception $e
* @param float $time
*/
public function addError(Test $test, \Exception $e, $time)
public function addError(Test $test, \Throwable $t, float $time): void
{
}

Expand All @@ -75,7 +75,7 @@ public function addError(Test $test, \Exception $e, $time)
*
* @since Method available since Release 5.1.0
*/
public function addWarning(Test $test, Warning $e, $time)
public function addWarning(Test $test, Warning $e, float $time): void
{
}

Expand All @@ -86,7 +86,7 @@ public function addWarning(Test $test, Warning $e, $time)
* @param AssertionFailedError $e
* @param float $time
*/
public function addFailure(Test $test, AssertionFailedError $e, $time)
public function addFailure(Test $test, AssertionFailedError $e, float $time): void
{
}

Expand All @@ -97,7 +97,7 @@ public function addFailure(Test $test, AssertionFailedError $e, $time)
* @param \Exception $e
* @param float $time
*/
public function addIncompleteTest(Test $test, \Exception $e, $time)
public function addIncompleteTest(Test $test, \Throwable $e, float $time): void
{
}

Expand All @@ -108,7 +108,7 @@ public function addIncompleteTest(Test $test, \Exception $e, $time)
* @param \Exception $e
* @param float $time
*/
public function addSkippedTest(Test $test, \Exception $e, $time)
public function addSkippedTest(Test $test, \Throwable $e, float $time): void
{
}

Expand All @@ -119,7 +119,7 @@ public function addSkippedTest(Test $test, \Exception $e, $time)
* @param \Exception $e
* @param float $time
*/
public function addRiskyTest(Test $test, \Exception $e, $time)
public function addRiskyTest(Test $test, \Throwable $e, float $time): void
{
}

Expand All @@ -130,7 +130,7 @@ public function addRiskyTest(Test $test, \Exception $e, $time)
*
* @return bool|null
*/
public function startTest(Test $test)
public function startTest(Test $test): void
{
$class = get_class($test);
$method = $test->getName(false);
Expand All @@ -152,7 +152,7 @@ public function startTest(Test $test)
}

if (empty($cassetteName)) {
return true;
return;
}

VCR::turnOn();
Expand Down Expand Up @@ -191,7 +191,7 @@ private static function parseDocBlock($docBlock, $tag)
* @param Test $test
* @param float $time
*/
public function endTest(Test $test, $time)
public function endTest(Test $test, float $time): void
{
VCR::turnOff();
}
Expand All @@ -201,7 +201,7 @@ public function endTest(Test $test, $time)
*
* @param TestSuite $suite
*/
public function startTestSuite(TestSuite $suite)
public function startTestSuite(TestSuite $suite): void
{
}

Expand All @@ -210,7 +210,7 @@ public function startTestSuite(TestSuite $suite)
*
* @param TestSuite $suite
*/
public function endTestSuite(TestSuite $suite)
public function endTestSuite(TestSuite $suite): void
{
}
}