Skip to content

Commit

Permalink
Merge pull request #27 from lolli42/phpunit-7
Browse files Browse the repository at this point in the history
[TASK] phpunit 7 compatibility
  • Loading branch information
fiunchinho authored May 9, 2018
2 parents 7316652 + 0cf3da8 commit a2d7c2b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
6 changes: 5 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,13 @@
],
"license": "MIT",
"require": {
"php": "^7.1"
},
"conflict": {
"phpunit/phpunit": "<7.0"
},
"require-dev": {
"phpunit/phpunit": "^6.0"
"phpunit/phpunit": "^7.0"
},
"bin": ["bin/phpunit-randomizer"],
"autoload": {
Expand Down
9 changes: 2 additions & 7 deletions src/PHPUnitRandomizer/Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@ public function __construct()
$this->longOptions['order='] = 'orderHandler';
}

public static function main($exit = TRUE)
{
return parent::main($exit);
}

/**
* Only called when 'order' argument is used.
*
Expand Down Expand Up @@ -51,12 +46,12 @@ private function getRandomSeed()
return rand(0, 9999);
}

protected function createRunner()
protected function createRunner(): \PHPUnit\TextUI\TestRunner
{
return new TestRunner($this->arguments['loader']);
}

public function showHelp()
public function showHelp(): void
{
parent::showHelp();

Expand Down
2 changes: 1 addition & 1 deletion src/PHPUnitRandomizer/ResultPrinter.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function __construct($out = null, $verbose = false, $colors = false, $deb
*
* @param PHPUnit\Framework\TestResult $result
*/
protected function printFooter(\PHPUnit\Framework\TestResult $result)
protected function printFooter(\PHPUnit\Framework\TestResult $result): void
{
parent::printFooter($result);

Expand Down
2 changes: 1 addition & 1 deletion src/PHPUnitRandomizer/TestRunner.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class TestRunner extends \PHPUnit\TextUI\TestRunner
* @param PHPUnit\Framework\Test $suite TestSuite to execute
* @param array $arguments Arguments to use
*/
public function doRun(\PHPUnit\Framework\Test $suite, array $arguments = array(), $exit = true)
public function doRun(\PHPUnit\Framework\Test $suite, array $arguments = array(), bool $exit = true): \PHPUnit\Framework\TestResult
{
$localArguments = $arguments;

Expand Down

0 comments on commit a2d7c2b

Please sign in to comment.