Skip to content

Commit

Permalink
update phpunit (fixes #40, via #39)
Browse files Browse the repository at this point in the history
  • Loading branch information
volkovs authored and baev committed Oct 25, 2018
1 parent 45504ae commit 9399629
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"source": "https://github.com/allure-framework/allure-phpunit"
},
"require": {
"php": ">=7.0.0",
"phpunit/phpunit": ">=6.0.0",
"php": ">=7.1.0",
"phpunit/phpunit": ">=7.0.0",
"mikey179/vfsStream": "1.*",
"allure-framework/allure-php-api": "~1.1.0"
},
Expand Down
20 changes: 10 additions & 10 deletions src/Yandex/Allure/Adapter/AllureAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public function prepareOutputDirectory($outputDirectory, $deletePreviousResults)
* @param Exception $e
* @param float $time
*/
public function addError(Test $test, Exception $e, $time)
public function addError(Test $test, \Throwable $e, float $time): void
{
$event = new TestCaseBrokenEvent();
Allure::lifecycle()->fire($event->withException($e)->withMessage($e->getMessage()));
Expand All @@ -103,7 +103,7 @@ public function addError(Test $test, Exception $e, $time)
* @param \PHPUnit\Framework\Warning $e
* @param float $time
*/
public function addWarning(Test $test, Warning $e, $time)
public function addWarning(Test $test, Warning $e, float $time): void
{
// TODO: Implement addWarning() method.
}
Expand All @@ -115,7 +115,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
{
$event = new TestCaseFailedEvent();

Expand All @@ -139,7 +139,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
{
$event = new TestCasePendingEvent();
Allure::lifecycle()->fire($event->withException($e));
Expand All @@ -153,7 +153,7 @@ public function addIncompleteTest(Test $test, Exception $e, $time)
* @param float $time
* @since Method available since Release 4.0.0
*/
public function addRiskyTest(Test $test, Exception $e, $time)
public function addRiskyTest(Test $test, \Throwable $e, float $time): void
{
$this->addIncompleteTest($test, $e, $time);
}
Expand All @@ -166,7 +166,7 @@ public function addRiskyTest(Test $test, Exception $e, $time)
* @param float $time
* @since Method available since Release 3.0.0
*/
public function addSkippedTest(Test $test, Exception $e, $time)
public function addSkippedTest(Test $test, \Throwable $e, float $time): void
{
$shouldCreateStartStopEvents = false;
if ($test instanceof TestCase){
Expand All @@ -191,7 +191,7 @@ public function addSkippedTest(Test $test, Exception $e, $time)
* @param TestSuite $suite
* @since Method available since Release 2.2.0
*/
public function startTestSuite(TestSuite $suite)
public function startTestSuite(TestSuite $suite): void
{
if ($suite instanceof DataProviderTestSuite) {
return;
Expand All @@ -218,7 +218,7 @@ public function startTestSuite(TestSuite $suite)
* @param TestSuite $suite
* @since Method available since Release 2.2.0
*/
public function endTestSuite(TestSuite $suite)
public function endTestSuite(TestSuite $suite): void
{
if ($suite instanceof DataProviderTestSuite) {
return;
Expand All @@ -232,7 +232,7 @@ public function endTestSuite(TestSuite $suite)
*
* @param Test $test
*/
public function startTest(Test $test)
public function startTest(Test $test): void
{
if ($test instanceof TestCase) {
$testName = $test->getName();
Expand All @@ -256,7 +256,7 @@ public function startTest(Test $test)
* @param float $time
* @throws \Exception
*/
public function endTest(Test $test, $time)
public function endTest(Test $test, float $time): void
{
if ($test instanceof TestCase) {
Allure::lifecycle()->fire(new TestCaseFinishedEvent());
Expand Down

0 comments on commit 9399629

Please sign in to comment.