N°8796 - Add PHP code style validation in iTop and extensions - format whole code base

This commit is contained in:
odain
2025-11-07 15:39:53 +01:00
parent 12f23113f5
commit 890a2568c8
2110 changed files with 53099 additions and 63885 deletions

View File

@@ -1,4 +1,5 @@
<?php
/*
* @copyright Copyright (C) 2010-2024 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
@@ -10,7 +11,6 @@ use Combodo\iTop\Test\UnitTest\ItopDataTestCase;
use RuntimeDashboard;
use SecurityException;
/**
* We need the metamodel started as this is a dependency of {@link RuntimeDashboard}
*
@@ -18,19 +18,20 @@ use SecurityException;
*/
class RuntimeDashboardTest extends ItopDataTestCase
{
const DEFAULT_WELCOME_DASHBOARD_PATH = 'env-production/itop-welcome-itil/welcomemenupage_dashboard.xml';
const SYSTEM_FILE_PATH = '../../system-file';
public const DEFAULT_WELCOME_DASHBOARD_PATH = 'env-production/itop-welcome-itil/welcomemenupage_dashboard.xml';
public const SYSTEM_FILE_PATH = '../../system-file';
/** @noinspection PhpUnhandledExceptionInspection */
public function testGetDashboard()
{
$sDashboardFileOk = APPROOT.self::DEFAULT_WELCOME_DASHBOARD_PATH;
$sDashboardId = uniqid(mt_rand(), TRUE);
$sDashboardId = uniqid(mt_rand(), true);
$oDashboard = RuntimeDashboard::GetDashboard($sDashboardFileOk, $sDashboardId);
$this->assertNotNull($oDashboard);
$this->expectException(SecurityException::class);
$sDashboardFileSuspect = APPROOT.self::SYSTEM_FILE_PATH;;
$sDashboardFileSuspect = APPROOT.self::SYSTEM_FILE_PATH;
;
RuntimeDashboard::GetDashboard($sDashboardFileSuspect, $sDashboardId);
}