Skip to content

Commit a2d7c2b

Browse files
authored
Merge pull request #27 from lolli42/phpunit-7
[TASK] phpunit 7 compatibility
2 parents 7316652 + 0cf3da8 commit a2d7c2b

File tree

4 files changed

+9
-10
lines changed

4 files changed

+9
-10
lines changed

composer.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,13 @@
1111
],
1212
"license": "MIT",
1313
"require": {
14+
"php": "^7.1"
15+
},
16+
"conflict": {
17+
"phpunit/phpunit": "<7.0"
1418
},
1519
"require-dev": {
16-
"phpunit/phpunit": "^6.0"
20+
"phpunit/phpunit": "^7.0"
1721
},
1822
"bin": ["bin/phpunit-randomizer"],
1923
"autoload": {

src/PHPUnitRandomizer/Command.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,6 @@ public function __construct()
88
$this->longOptions['order='] = 'orderHandler';
99
}
1010

11-
public static function main($exit = TRUE)
12-
{
13-
return parent::main($exit);
14-
}
15-
1611
/**
1712
* Only called when 'order' argument is used.
1813
*
@@ -51,12 +46,12 @@ private function getRandomSeed()
5146
return rand(0, 9999);
5247
}
5348

54-
protected function createRunner()
49+
protected function createRunner(): \PHPUnit\TextUI\TestRunner
5550
{
5651
return new TestRunner($this->arguments['loader']);
5752
}
5853

59-
public function showHelp()
54+
public function showHelp(): void
6055
{
6156
parent::showHelp();
6257

src/PHPUnitRandomizer/ResultPrinter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function __construct($out = null, $verbose = false, $colors = false, $deb
3232
*
3333
* @param PHPUnit\Framework\TestResult $result
3434
*/
35-
protected function printFooter(\PHPUnit\Framework\TestResult $result)
35+
protected function printFooter(\PHPUnit\Framework\TestResult $result): void
3636
{
3737
parent::printFooter($result);
3838

src/PHPUnitRandomizer/TestRunner.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class TestRunner extends \PHPUnit\TextUI\TestRunner
1010
* @param PHPUnit\Framework\Test $suite TestSuite to execute
1111
* @param array $arguments Arguments to use
1212
*/
13-
public function doRun(\PHPUnit\Framework\Test $suite, array $arguments = array(), $exit = true)
13+
public function doRun(\PHPUnit\Framework\Test $suite, array $arguments = array(), bool $exit = true): \PHPUnit\Framework\TestResult
1414
{
1515
$localArguments = $arguments;
1616

0 commit comments

Comments
 (0)