diff --git a/test/application/RuntimeDashboardTest.php b/test/application/RuntimeDashboardTest.php new file mode 100644 index 000000000..b8dc86b8d --- /dev/null +++ b/test/application/RuntimeDashboardTest.php @@ -0,0 +1,46 @@ +assertNotNull($oDashboard); + + $this->expectException(SecurityException::class); + $sDashboardFileSuspect = APPROOT.self::SYSTEM_FILE_PATH;; + RuntimeDashboard::GetDashboard($sDashboardFileSuspect, $sDashboardId); + } + + /** @noinspection PhpUnhandledExceptionInspection */ + public function testGetDefinitionFileRelative() + { + $sFullDashboardPath = RuntimeDashboard::GetDashboardFileFromRelativePath(self::DEFAULT_WELCOME_DASHBOARD_PATH); + $this->assertSame(APPROOT.self::DEFAULT_WELCOME_DASHBOARD_PATH, $sFullDashboardPath); + + $this->expectException(SecurityException::class); + RuntimeDashboard::GetDashboardFileFromRelativePath(self::SYSTEM_FILE_PATH); + } +}