N°5298 - Upgrade CKEditor to version 5

- restore broken test for CKEditor resources check
This commit is contained in:
Benjamin Dalsass
2024-05-28 08:29:40 +02:00
parent 7769e5e116
commit e6c3744aaa
2 changed files with 35 additions and 1 deletions

View File

@@ -0,0 +1,35 @@
<?php
/*
* @copyright Copyright (C) 2010-2024 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
*/
namespace Combodo\iTop\Test\UnitTest\Application\Helper;
use Combodo\iTop\Application\Helper\CKEditorHelper;
use Combodo\iTop\Test\UnitTest\ItopTestCase;
/**
* @covers WebPage
*/
class CKEditorHelperTest extends ItopTestCase
{
/**
* @dataProvider CheckFilesExistProvider
* @param string $sMethodName
*/
public function testCheckFilesExist($sMethodName)
{
$aFilesRelPaths = CKEditorHelper::$sMethodName();
foreach ($aFilesRelPaths as $sFileRelPath) {
$this->assertTrue(file_exists(APPROOT.$sFileRelPath), $sMethodName.' method returns a non existing file: '.$sFileRelPath);
}
}
public function CheckFilesExistProvider(): array
{
return [
'GetJSFilesRelPathsForCKEditor' => ['GetJSFilesRelPathsForCKEditor'],
];
}
}

View File

@@ -29,7 +29,6 @@ class WebResourcesHelperTest extends ItopTestCase
public function CheckFilesExistProvider(): array
{
return [
'GetJSFilesRelPathsForCKEditor' => ['GetJSFilesRelPathsForCKEditor'],
'GetCSSFilesRelPathsForC3JS' => ['GetCSSFilesRelPathsForC3JS'],
'GetJSFilesRelPathsForC3JS' => ['GetJSFilesRelPathsForC3JS'],
];