mirror of
https://github.com/Combodo/iTop.git
synced 2026-03-03 16:14:13 +01:00
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:
@@ -13,14 +13,14 @@ class iTopConfigParserTest extends ItopTestCase
|
||||
private $tmpSavePath;
|
||||
private $sConfigPath;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
require_once APPROOT.'/core/iTopConfigParser.php';
|
||||
|
||||
clearstatcache();
|
||||
$this->sConfigPath = utils::GetConfigFilePath();
|
||||
$this->tmpSavePath = tempnam( '/tmp/', 'config-itop');
|
||||
$this->tmpSavePath = tempnam('/tmp/', 'config-itop');
|
||||
|
||||
$this->conf_exists = is_file($this->sConfigPath);
|
||||
if ($this->conf_exists)
|
||||
@@ -30,11 +30,10 @@ class iTopConfigParserTest extends ItopTestCase
|
||||
clearstatcache();
|
||||
}
|
||||
|
||||
public function tearDown()
|
||||
public function tearDown(): void
|
||||
{
|
||||
parent::tearDown(); // TODO: Change the autogenerated stub
|
||||
if ($this->conf_exists)
|
||||
{
|
||||
if ($this->conf_exists) {
|
||||
rename($this->tmpSavePath, $this->sConfigPath);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user