diff --git a/.travis.yml b/.travis.yml index 86edc5c..ed1db6d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,8 +4,8 @@ sudo: false dist: trusty php: - - 7.0 - 7.1 + - 7.2 - nightly before_script: diff --git a/composer.json b/composer.json index 575cda2..81fc86d 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,7 @@ "whatthejeff/nyancat-scoreboard": "~1.1" }, "require-dev": { - "phpunit/phpunit": "^6.5" + "phpunit/phpunit": "^7.0" }, "autoload": { "psr-4": { diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 2fb2f98..1058983 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -10,7 +10,6 @@ printerClass="NyanCat\PHPUnit\ResultPrinter" processIsolation="false" stopOnFailure="false" - syntaxCheck="false" bootstrap="vendor/autoload.php" > diff --git a/src/NyanCat/PHPUnit/ResultPrinter.php b/src/NyanCat/PHPUnit/ResultPrinter.php index 5ccd34c..c3e8da7 100644 --- a/src/NyanCat/PHPUnit/ResultPrinter.php +++ b/src/NyanCat/PHPUnit/ResultPrinter.php @@ -68,10 +68,11 @@ public function __construct($out = NULL, $verbose = FALSE, $colors = self::COLOR /** * {@inheritdoc} */ - protected function writeProgress($progress) + protected function writeProgress(string $progress): void { if($this->debug) { - return parent::writeProgress($progress); + parent::writeProgress($progress); + return ; } $this->scoreboard->score($progress); @@ -80,7 +81,7 @@ protected function writeProgress($progress) /** * {@inheritdoc} */ - protected function printHeader() + protected function printHeader(): void { if (!$this->debug) { if (!$this->scoreboard->isRunning()) { @@ -95,10 +96,11 @@ protected function printHeader() /** * {@inheritdoc} */ - public function addError(Test $test, \Exception $e, $time) + public function addError(Test $test, \Throwable $e, float $time): void { if ($this->debug) { - return parent::addError($test, $e, $time); + parent::addError($test, $e, $time); + return ; } $this->writeProgress('fail'); @@ -108,10 +110,11 @@ public function addError(Test $test, \Exception $e, $time) /** * {@inheritdoc} */ - public function addFailure(Test $test, AssertionFailedError $e, $time) + public function addFailure(Test $test, AssertionFailedError $e, float $time): void { if ($this->debug) { - return parent::addFailure($test, $e, $time); + parent::addFailure($test, $e, $time); + return ; } $this->writeProgress('fail'); @@ -121,10 +124,11 @@ public function addFailure(Test $test, AssertionFailedError $e, $time) /** * {@inheritdoc} */ - public function addIncompleteTest(Test $test, \Exception $e, $time) + public function addIncompleteTest(Test $test, \Throwable $e, float $time): void { if ($this->debug) { - return parent::addIncompleteTest($test, $e, $time); + parent::addIncompleteTest($test, $e, $time); + return ; } $this->writeProgress('pending'); @@ -134,10 +138,11 @@ public function addIncompleteTest(Test $test, \Exception $e, $time) /** * {@inheritdoc} */ - public function addSkippedTest(Test $test, \Exception $e, $time) + public function addSkippedTest(Test $test, \Throwable $e, float $time): void { if ($this->debug) { - return parent::addSkippedTest($test, $e, $time); + parent::addSkippedTest($test, $e, $time); + return ; } $this->writeProgress('pending'); @@ -147,10 +152,11 @@ public function addSkippedTest(Test $test, \Exception $e, $time) /** * {@inheritdoc} */ - public function startTestSuite(TestSuite $suite) + public function startTestSuite(TestSuite $suite): void { if ($this->debug) { - return parent::startTestSuite($suite); + parent::startTestSuite($suite); + return ; } if ($this->numTests == -1) { @@ -162,10 +168,11 @@ public function startTestSuite(TestSuite $suite) /** * {@inheritdoc} */ - public function endTest(Test $test, $time) + public function endTest(Test $test, float $time): void { if ($this->debug) { - return parent::endTest($test, $time); + parent::endTest($test, $time); + return ; } if (!$this->lastTestFailed) { diff --git a/tests/NyanCat/PHPUnit/Tests/_files/phpunit.xml b/tests/NyanCat/PHPUnit/Tests/_files/phpunit.xml index 0682613..a3cf021 100644 --- a/tests/NyanCat/PHPUnit/Tests/_files/phpunit.xml +++ b/tests/NyanCat/PHPUnit/Tests/_files/phpunit.xml @@ -9,8 +9,7 @@ printerClass="NyanCat\PHPUnit\ResultPrinter" processIsolation="false" stopOnFailure="false" - syntaxCheck="false" bootstrap="../../../../../vendor/autoload.php" > - \ No newline at end of file +