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

@@ -77,7 +77,7 @@ class ItopDataTestCase extends ItopTestCase
/**
* @throws Exception
*/
protected function setUp()
protected function setUp(): void
{
parent::setUp();
require_once(APPROOT.'/application/startup.inc.php');
@@ -101,15 +101,12 @@ class ItopDataTestCase extends ItopTestCase
/**
* @throws Exception
*/
protected function tearDown()
protected function tearDown(): void
{
if (static::USE_TRANSACTION)
{
if (static::USE_TRANSACTION) {
$this->debug("ROLLBACK !!!");
CMDBSource::Query('ROLLBACK');
}
else
{
} else {
$this->debug("");
$this->aCreatedObjects = array_reverse($this->aCreatedObjects);
foreach ($this->aCreatedObjects as $oObject)