mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-25 11:38:44 +02:00
N°8796 - Add PHP code style validation in iTop and extensions - format whole code base
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user