2
0
forked from Wavyzz/dolibarr

Clean code. Add a phpunit test to avoid duplicate jquery.

This commit is contained in:
Laurent Destailleur
2022-12-24 15:06:32 +01:00
parent b80413db2b
commit 685a7dbd59
16 changed files with 226 additions and 2833 deletions

View File

@@ -469,25 +469,6 @@ class FilesLibTest extends PHPUnit\Framework\TestCase
$this->assertGreaterThanOrEqual(1, $result, "Pb with dol_compress_dir of ".$dirout." into ".$conf->admin->dir_temp.'/testdir.zip');
}
/**
* testDolDirList
*
* @return void
*
* @depends testDolCompressUnCompress
* The depends says test is run only if previous is ok
*/
public function testDolDirList()
{
global $conf,$user,$langs,$db;
// Scan dir to guaruante we on't have library jquery twice (we accept exception of duplicte into ckeditor because all dir is removed for debian package, so there is no duplicate).
$founddirs=dol_dir_list(DOL_DOCUMENT_ROOT.'/includes/', 'files', 1, '^jquery\.js', array('ckeditor'));
print __METHOD__." count(founddirs)=".count($founddirs)."\n";
$this->assertEquals(1, count($founddirs));
}
/**
* testDolCheckSecureAccessDocument
*