N°3091 Update PHPUnit to 8.5 : fix setUp and teardDown methods signatures

"Return type declaration must be compatible with parent"
See https://phpunit.de/announcements/phpunit-8.html "Return Type of Template Methods"
This commit is contained in:
Pierre Goiffon
2022-04-21 10:37:07 +02:00
parent cacf0004a5
commit ec143c43db
50 changed files with 101 additions and 176 deletions

View File

@@ -34,10 +34,11 @@ class ItopTestCase extends TestCase
{
const TEST_LOG_DIR = 'test';
protected function setUp()
/** @noinspection UsingInclusionOnceReturnValueInspection avoid errors for approot includes */
protected function setUp(): void
{
@include_once '../approot.inc.php';
@include_once '../../approot.inc.php';
@include_once '../../approot.inc.php';
@include_once '../../../approot.inc.php';
@include_once '../../../../approot.inc.php';
@include_once '../../../../../approot.inc.php';
@@ -45,7 +46,7 @@ class ItopTestCase extends TestCase
@include_once '../../../../../../../approot.inc.php';
@include_once '../../../../../../../../approot.inc.php';
$this->debug("\n----------\n---------- ".$this->getName()."\n----------\n");
$this->debug("\n----------\n---------- ".$this->getName()."\n----------\n");
}
@@ -57,9 +58,9 @@ class ItopTestCase extends TestCase
{
echo "$sMsg\n";
}
else
{
print_r($sMsg);
else {
/** @noinspection ForgottenDebugOutputInspection */
print_r($sMsg);
}
}
}