mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-21 09:38:48 +02: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:
@@ -28,7 +28,6 @@ namespace Combodo\iTop\Test\UnitTest\Core;
|
||||
|
||||
use Combodo\iTop\Test\UnitTest\ItopTestCase;
|
||||
use Dict;
|
||||
use Exception;
|
||||
|
||||
|
||||
/**
|
||||
@@ -42,12 +41,12 @@ class dictApcuTest extends ItopTestCase
|
||||
private $oApcService;
|
||||
private $sDictionaryFolder;
|
||||
|
||||
protected function setUp()
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
require_once (APPROOT.'core' . DIRECTORY_SEPARATOR . 'coreexception.class.inc.php');
|
||||
require_once (APPROOT.'core' . DIRECTORY_SEPARATOR . 'dict.class.inc.php');
|
||||
require_once (APPROOT.'core' . DIRECTORY_SEPARATOR . 'apc-service.class.inc.php');
|
||||
require_once(APPROOT.'core'.DIRECTORY_SEPARATOR.'coreexception.class.inc.php');
|
||||
require_once(APPROOT.'core'.DIRECTORY_SEPARATOR.'dict.class.inc.php');
|
||||
require_once(APPROOT.'core'.DIRECTORY_SEPARATOR.'apc-service.class.inc.php');
|
||||
|
||||
$this->sEnvName = time();
|
||||
$_SESSION['itop_env'] = $this->sEnvName;
|
||||
@@ -110,12 +109,12 @@ PHP;
|
||||
file_put_contents($sDictionaryFolder . DIRECTORY_SEPARATOR . "$sLanguageCodeInFilename.dict.php", $sContent);
|
||||
}
|
||||
|
||||
protected function tearDown()
|
||||
protected function tearDown(): void
|
||||
{
|
||||
foreach (glob(APPROOT."env-$this->sEnvName" . DIRECTORY_SEPARATOR . "dictionaries" . DIRECTORY_SEPARATOR . "*") as $sFile){
|
||||
foreach (glob(APPROOT."env-$this->sEnvName".DIRECTORY_SEPARATOR."dictionaries".DIRECTORY_SEPARATOR."*") as $sFile) {
|
||||
unlink($sFile);
|
||||
}
|
||||
rmdir(APPROOT."env-$this->sEnvName" . DIRECTORY_SEPARATOR . "dictionaries");
|
||||
rmdir(APPROOT."env-$this->sEnvName".DIRECTORY_SEPARATOR."dictionaries");
|
||||
rmdir(APPROOT."env-$this->sEnvName");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user