1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-16 03:24:20 +02:00

Issue #5465 Core language files converted. (excluding plugins)

This commit is contained in:
camer0n
2025-04-04 18:29:07 -07:00
parent c46b7b1d36
commit 31e7d1d3b0
93 changed files with 5255 additions and 6358 deletions

View File

@@ -14,12 +14,17 @@ class InstallCest
}
// tests
public function installWelcomePageContainsExpectedContent(AcceptanceTester $I)
/**
* @param AcceptanceTester $I
* @return void
*/
/*public function installWelcomePageContainsExpectedContent(AcceptanceTester $I)
{
$I->amOnPage('/install.php');
$I->see("e107 Installation :: Step 1");
$I->see("Installation : Step 1 of 8");
$I->see("Language Selection");
}
}*/
public function installDefault(AcceptanceTester $I)
{

View File

@@ -1127,6 +1127,9 @@ class e107Test extends \Codeception\Test\Unit
}
/**
* @return void
*/
public function testGetCoreTemplate()
{
@@ -1151,11 +1154,11 @@ class e107Test extends \Codeception\Test\Unit
$path = str_replace('_template.php', '', $file);
e107::coreLan($path);
$e107::coreLan($path);
if($path === 'signup')
{
e107::coreLan('user');
$e107::coreLan('user');
}
$result = $e107::getCoreTemplate($path);
@@ -1318,18 +1321,223 @@ class e107Test extends \Codeception\Test\Unit
$res = null;
$this::assertTrue($res);
}
public function testCoreLan()
{
$res = null;
$this::assertTrue($res);
}
*/
/**
* @runInSeparateProcess
* @return void
*/
public function testCoreLan()
{
// Example constant known to be in core language files, adjust accordingly.
$constant = 'LAN_MEMBERS_0';
$expected = "restricted area";
// First, ensure the constant is not already defined (clean test scenario).
if(defined($constant))
{
$this::markTestSkipped("Constant '$constant' was already defined. Skipped for accurate isolation.");
}
// Call the method you need to test.
$this->e107::coreLan('membersonly'); // 'admin' is an example; adjust if needed based on your actual language files
// Check if the constant is correctly defined afterward.
$this::assertTrue(defined($constant), "coreLan() should define the constant '{$constant}'.");
$this::assertEquals($expected, constant($constant), "coreLan() loaded an incorrect value for '{$constant}'.");
}
/**
* @runInSeparateProcess
*/
public function testCoreLanArray()
{
$languageDir = e_LANGUAGEDIR . 'English/';
$langFile = $languageDir . 'lan_test0000.php';
// Ensure the language directory exists.
if(!is_dir($languageDir))
{
mkdir($languageDir, 0777, true);
}
// Populate the file dynamically with an array of test language terms.
file_put_contents($langFile, "<?php\nreturn [\n" .
"'LAN_TEST0000_ONE' => 'Test value one',\n" .
"'LAN_TEST0000_TWO' => 'Test value two',\n" .
"'LAN_TEST0000_THREE' => 'Test value three',\n" .
"];");
// Store created file for later cleanup.
$this->tempFiles[] = $langFile;
// Define the constant and expected output.
$constant = 'LAN_TEST0000_ONE';
$expected = 'Test value one';
// Confirm the file was created.
$this->assertTrue(is_readable($langFile), "{$langFile} should have been created and readable.");
// Skip if already defined, ensuring proper isolation.
if(defined($constant))
{
$this::markTestSkipped("Constant '{$constant}' was already defined. Skipped for accurate isolation.");
}
// Run the method you test, passing the newly generated identifier.
$this->e107->coreLan('test0000');
// Verify the constant has been defined and contains the correct value.
$this->assertTrue(defined($constant), "coreLan() should define the constant '{$constant}'.");
$this->assertEquals($expected, constant($constant), "coreLan() loaded an incorrect value for '{$constant}'.");
}
/**
* @runInSeparateProcess
* @return void
*/
public function testPlugLan()
{
// Prepare the plugin directory and test files
$pluginName = 'testplugin';
$languageDir = e_PLUGIN . $pluginName . '/languages/';
$frontLangFile = $languageDir . 'English_front.php';
$adminLangFile = $languageDir . 'English_admin.php';
$globalLangFile = $languageDir . 'English_global.php';
// Ensure language directory exists for testing
if(!is_dir($languageDir))
{
mkdir($languageDir, 0777, true);
}
// Create mock language files with temporary constants clearly defined:
file_put_contents($frontLangFile, "<?php define('TESTPLUGIN_FRONT_LAN', 'Front Language Loaded');");
file_put_contents($adminLangFile, "<?php define('TESTPLUGIN_ADMIN_LAN', 'Admin Language Loaded');");
file_put_contents($globalLangFile, "<?php define('TESTPLUGIN_GLOBAL_LAN', 'Global Language Loaded');");
$this->tempFiles[] = $frontLangFile;
$this->tempFiles[] = $adminLangFile;
$this->tempFiles[] = $globalLangFile;
// 1. Test normal front-end file loading
$retFront = e107::plugLan($pluginName);
$this::assertTrue(defined('TESTPLUGIN_FRONT_LAN'), 'Front-end language file should be loaded.');
$this::assertEquals('Front Language Loaded', constant('TESTPLUGIN_FRONT_LAN'));
// 2. Test Admin file loading
$retAdmin = e107::plugLan($pluginName, true);
$this::assertTrue(defined('TESTPLUGIN_ADMIN_LAN'), 'Admin language file should be loaded.');
$this::assertEquals('Admin Language Loaded', constant('TESTPLUGIN_ADMIN_LAN'));
// 3. Test Global file loading
$retGlobal = e107::plugLan($pluginName, 'global');
$this::assertTrue(defined('TESTPLUGIN_GLOBAL_LAN'), 'Global language file should be loaded.');
$this::assertEquals('Global Language Loaded', constant('TESTPLUGIN_GLOBAL_LAN'));
// 4. Test 'flat=true' parameter
$flatLangDir = $languageDir . 'English';
$flatLangFile = $flatLangDir . '/English_flatfile.php';
if(!is_dir($flatLangDir))
{
mkdir($flatLangDir, 0777, true);
}
file_put_contents($flatLangFile, "<?php define('TESTPLUGIN_FLAT_LAN', 'Flat Language Loaded');");
$this->tempFiles[] = $flatLangFile;
$retFlat = e107::plugLan($pluginName, 'flatfile', true);
$this::assertTrue(defined('TESTPLUGIN_FLAT_LAN'), 'Flat language file should be loaded.');
$this::assertEquals('Flat Language Loaded', constant('TESTPLUGIN_FLAT_LAN'));
// 5. Test return path functionality
$returnedPath = e107::plugLan($pluginName, 'global', false, true);
$expectedPath = e_PLUGIN . $pluginName . '/languages/English_global.php';
$this::assertEquals($expectedPath, $returnedPath, 'plugLan() should correctly return the path when $returnPath=true.');
}
/**
* @runInSeparateProcess
* @return void
*/
/**
* @runInSeparateProcess
* @return void
*/
public function testPlugLanArray()
{
$pluginName = 'testplugin2';
$languageDir = e_PLUGIN . $pluginName . '/languages/';
$frontLangFile = $languageDir . 'English_front.php';
$adminLangFile = $languageDir . 'English_admin.php';
$globalLangFile = $languageDir . 'English_global.php';
if(!is_dir($languageDir))
{
mkdir($languageDir, 0777, true);
}
file_put_contents($frontLangFile, "<?php return ['TESTPLUGIN_FRONT_ARR_LAN' => 'Front Language Loaded'];");
file_put_contents($adminLangFile, "<?php return ['TESTPLUGIN_ADMIN_ARR_LAN' => 'Admin Language Loaded'];");
file_put_contents($globalLangFile, "<?php return ['TESTPLUGIN_GLOBAL_ARR_LAN' => 'Global Language Loaded'];");
$this->tempFiles[] = $frontLangFile;
$this->tempFiles[] = $adminLangFile;
$this->tempFiles[] = $globalLangFile;
$this->assertTrue(is_readable($frontLangFile), 'Front language file exists and is readable.');
$retFront = e107::plugLan($pluginName);
$this->assertTrue($retFront, 'plugLan() should return true after successful inclusion');
$this->assertTrue(defined('TESTPLUGIN_FRONT_ARR_LAN'), 'Constant TESTPLUGIN_FRONT_ARR_LAN should be defined.');
$this->assertEquals('Front Language Loaded', constant('TESTPLUGIN_FRONT_ARR_LAN'));
$this->assertTrue(is_readable($adminLangFile), 'Admin language file exists and is readable.');
$retAdmin = e107::plugLan($pluginName, true);
$this->assertTrue($retAdmin, 'plugLan(true) should return true after admin file inclusion');
$this->assertTrue(defined('TESTPLUGIN_ADMIN_ARR_LAN'), 'Constant TESTPLUGIN_ADMIN_ARR_LAN should be defined.');
$this->assertEquals('Admin Language Loaded', constant('TESTPLUGIN_ADMIN_ARR_LAN'));
$this->assertTrue(is_readable($globalLangFile), 'Global language file exists and is readable.');
$retGlobal = e107::plugLan($pluginName, 'global');
$this->assertTrue($retGlobal, 'plugLan(global) should return true after global file inclusion');
$this->assertTrue(defined('TESTPLUGIN_GLOBAL_ARR_LAN'), 'Constant TESTPLUGIN_GLOBAL_ARR_LAN should be defined.');
$this->assertEquals('Global Language Loaded', constant('TESTPLUGIN_GLOBAL_ARR_LAN'));
$flatLangDir = $languageDir . 'English';
$flatLangFile = $flatLangDir . '/English_flatfile.php';
if(!is_dir($flatLangDir))
{
mkdir($flatLangDir, 0777, true);
}
file_put_contents($flatLangFile, "<?php return ['TESTPLUGIN_FLAT_LAN' => 'Flat Language Loaded'];");
$this->tempFiles[] = $flatLangFile;
$this->assertTrue(is_readable($flatLangFile), 'Flat language file exists and is readable.');
$retFlat = e107::plugLan($pluginName, 'flatfile', true);
$this->assertTrue($retFlat, 'Flat file inclusion via plugLan(true, flatfile) should return true');
$this->assertTrue(defined('TESTPLUGIN_FLAT_LAN'), 'Constant TESTPLUGIN_FLAT_LAN should be defined.');
$this->assertEquals('Flat Language Loaded', constant('TESTPLUGIN_FLAT_LAN'));
$returnedPath = e107::plugLan($pluginName, 'global', false, true);
$expectedPath = e_PLUGIN . $pluginName . '/languages/English_global.php';
$this->assertEquals($expectedPath, $returnedPath, 'plugLan() should correctly return the path when $returnPath=true.');
}
/**
* @runInSeparateProcess
* @return void
*/
public function testPlugLanPath()
{
$e107 = $this->e107;

View File

@@ -215,8 +215,8 @@ class e_parse_shortcodeTest extends \Codeception\Test\Unit
// require_once(e_CORE."shortcodes/batch/admin_shortcodes.php");
e107::getScBatch('admin');
require_once(e_LANGUAGEDIR.'English/admin/lan_header.php');
require_once(e_LANGUAGEDIR.'English/admin/lan_footer.php');
e107::includeLan(e_LANGUAGEDIR.'English/admin/lan_header.php');
e107::includeLan(e_LANGUAGEDIR.'English/admin/lan_footer.php');
e107::loadAdminIcons();

View File

@@ -14,8 +14,8 @@ class e_userpermsTest extends \Codeception\Test\Unit
try
{
e107::loadAdminIcons();
require_once(e_LANGUAGEDIR . 'English/English.php');
require_once(e_LANGUAGEDIR . 'English/admin/lan_admin.php');
e107::includeLan(e_LANGUAGEDIR . 'English/English.php');
e107::includeLan(e_LANGUAGEDIR . 'English/admin/lan_admin.php');
include_once(e_HANDLER . 'user_handler.php');
$this->eup = $this->make('e_userperms');
@@ -32,8 +32,8 @@ class e_userpermsTest extends \Codeception\Test\Unit
{
$this::assertSame(LAN_EDIT,'Edit');
$this::assertSame(LAN_CATEGORY,'Category');
$this::assertSame(ADLAN_0, 'News');
$this::assertSame(LAN_MEDIAMANAGER, 'Media Manager');
$this::assertSame(constant('ADLAN_0'), 'News');
$this::assertSame(constant('LAN_MEDIAMANAGER'), 'Media Manager');
$this->eup->__construct();

View File

@@ -144,159 +144,193 @@
$this->assertEquals($expected, $input);
}
public function testPluginScripts()
{
$core = e107::getPlug()->getCorePluginList();
$exclude = [
'forum/forum_post.php',
'forum/forum_viewtopic.php',
'forum/index.php',
'online/online_menu.php',
'pm/pm.php',
'poll/admin_config.php',
'rss_menu/rss.php',
'tagcloud/tagcloud_menu.php',
'tinymce4/wysiwyg.php',
];
$focus = [];
/**
* @runInSeparateProcess
* @return void
*/
public function testPluginScripts()
{
$errors = [];
$core = e107::getPlug()->getCorePluginList();
$exclude = [
'forum/forum_post.php',
'forum/forum_viewtopic.php',
'forum/index.php',
'online/online_menu.php',
'pm/pm.php',
'poll/admin_config.php',
'rss_menu/rss.php',
'tagcloud/tagcloud_menu.php',
'tinymce4/wysiwyg.php',
];
$focus = [];
foreach ($core as $plug) {
$path = realpath(e107::getFolder('plugins') . $plug);
if ($path === false) {
fwrite(STDOUT, "Plugin directory not found: {$plug}\n");
continue;
}
$errors = [];
$file[$plug] = scandir($path);
unset($file[$plug][0], $file[$plug][1]);
sort($file[$plug]);
foreach($core as $plug)
{
$path = realpath(e107::getFolder('plugins') . $plug);
if($path === false)
{
fwrite(STDOUT, "Plugin directory not found: {$plug}\n");
continue;
}
if (!empty($focus) && !isset($focus[$plug])) {
unset($file[$plug]);
continue;
}
$file[$plug] = scandir($path);
unset($file[$plug][0], $file[$plug][1]);
sort($file[$plug]);
e107::plugLan($plug, 'global');
e107::getConfig()->setPref('plug_installed/' . $plug, 1);
}
if(!empty($focus) && !isset($focus[$plug]))
{
unset($file[$plug]);
continue;
}
foreach ($file as $plug => $files) {
$pluginFiles = [];
foreach ($files as $f) {
$filePath = realpath(e107::getFolder('plugins') . $plug) . DIRECTORY_SEPARATOR . $f;
if (!empty($focus) && $f !== $focus[$plug]) {
continue;
}
if (is_dir($filePath) || strpos($f, '_sql.php') !== false || strpos($f, '.php') === false || in_array($plug . '/' . $f, $exclude)) {
continue;
}
if (!file_exists($filePath)) {
fwrite(STDOUT, "File not found: {$plug}/{$f}\n");
continue;
}
$pluginFiles[$plug . '/' . $f] = $filePath;
}
e107::plugLan($plug, 'global');
e107::getConfig()->setPref('plug_installed/' . $plug, 1);
}
if (empty($pluginFiles)) {
fwrite(STDOUT, "No testable files found for plugin: {$plug}\n");
continue;
}
foreach($file as $plug => $files)
{
$pluginFiles = [];
foreach($files as $f)
{
$filePath = realpath(e107::getFolder('plugins') . $plug) . DIRECTORY_SEPARATOR . $f;
if(!empty($focus) && $f !== $focus[$plug])
{
continue;
}
if(is_dir($filePath) || strpos($f, '_sql.php') !== false || strpos($f, '.php') === false || in_array($plug . '/' . $f, $exclude))
{
continue;
}
if(!file_exists($filePath))
{
fwrite(STDOUT, "File not found: {$plug}/{$f}\n");
continue;
}
$pluginFiles[$plug . '/' . $f] = $filePath;
}
fwrite(STDOUT, "Testing plugin: {$plug}\n");
foreach ($pluginFiles as $relativePath => $_) {
fwrite(STDOUT, " - $relativePath\n");
}
if(empty($pluginFiles))
{
fwrite(STDOUT, "No testable files found for plugin: {$plug}\n");
continue;
}
// Build the command
$requireStatements = '';
$firstFilePath = reset($pluginFiles);
$e107Root = realpath(dirname($firstFilePath) . '/../../');
$class2Path = $e107Root . '/class2.php';
if ($class2Path === false || !file_exists($class2Path)) {
fwrite(STDOUT, "Error: Could not locate class2.php at $class2Path\n");
$errors[] = "Error: Could not locate class2.php for plugin {$plug}";
continue;
}
$lanAdminPath = $e107Root . '/e107_languages/English/admin/lan_admin.php';
if (!file_exists($lanAdminPath)) {
fwrite(STDOUT, "Error: Could not locate lan_admin.php at $lanAdminPath\n");
$errors[] = "Error: Could not locate lan_admin.php for plugin {$plug}";
continue;
}
fwrite(STDOUT, "Testing plugin: {$plug}\n");
foreach($pluginFiles as $relativePath => $_)
{
fwrite(STDOUT, " - $relativePath\n");
}
$requireStatements .= "error_reporting(E_ALL); ini_set('display_errors', 1); ";
$requireStatements .= "require_once '" . addslashes($class2Path) . "'; ";
$requireStatements .= "require_once '" . addslashes($lanAdminPath) . "'; ";
$requireStatements .= "e107::plugLan('" . addslashes($plug) . "', 'global'); ";
$requireStatements .= "e107::getConfig()->setPref('plug_installed/" . addslashes($plug) . "', 1); ";
foreach ($pluginFiles as $relativePath => $filePath) {
$requireStatements .= "echo 'START: " . addslashes($relativePath) . "\\n'; ";
$requireStatements .= "require_once '" . addslashes($filePath) . "'; ";
$requireStatements .= "echo 'END: " . addslashes($relativePath) . "\\n'; ";
}
$runCommand = sprintf('php -r %s 1>NUL 2>&1', escapeshellarg($requireStatements));
// Build the command
$requireStatements = '';
$firstFilePath = reset($pluginFiles);
$e107Root = realpath(dirname($firstFilePath) . '/../../');
$class2Path = $e107Root . '/class2.php';
if($class2Path === false || !file_exists($class2Path))
{
fwrite(STDOUT, "Error: Could not locate class2.php at $class2Path\n");
$errors[] = "Error: Could not locate class2.php for plugin {$plug}";
continue;
}
$lanAdminPath = $e107Root . '/e107_languages/English/admin/lan_admin.php';
if(!file_exists($lanAdminPath))
{
fwrite(STDOUT, "Error: Could not locate lan_admin.php at $lanAdminPath\n");
$errors[] = "Error: Could not locate lan_admin.php for plugin {$plug}";
continue;
}
// Execute and capture errors
exec($runCommand, $runOutput, $runExitCode);
$requireStatements .= "error_reporting(E_ALL); ini_set('display_errors', 1); ";
$requireStatements .= "require_once ('" . addslashes($class2Path) . "'); ";
$requireStatements .= "e107::includeLan( '" . addslashes($lanAdminPath) . "'); ";
$requireStatements .= "e107::plugLan('" . addslashes($plug) . "', 'global'); ";
$requireStatements .= "e107::getConfig()->setPref('plug_installed/" . addslashes($plug) . "', 1); ";
foreach($pluginFiles as $relativePath => $filePath)
{
$requireStatements .= "echo 'START: " . addslashes($relativePath) . "\\n'; ";
$requireStatements .= "require_once '" . addslashes($filePath) . "'; ";
$requireStatements .= "echo 'END: " . addslashes($relativePath) . "\\n'; ";
}
$runCommand = sprintf('php -r %s 1>NUL 2>&1', escapeshellarg($requireStatements));
if ($runExitCode !== 0 || !empty($runOutput)) {
$output = implode("\n", $runOutput);
if (!empty($output)) {
if (preg_match('/(Parse error|Fatal error|Warning|Notice):.*in\s+([^\s]+)\s+on\s+line\s+(\d+)/i', $output, $match)) {
$errorMessage = $match[0];
$errorFile = $match[2];
$relativePath = array_search($errorFile, $pluginFiles) ?: $plug . '/unknown';
$error = "Error in {$relativePath}: $errorMessage";
fwrite(STDOUT, "$error\n");
$errors[] = $error;
} else {
$firstLine = strtok($output, "\n");
$error = "Error in {$plug}: $firstLine";
fwrite(STDOUT, "$error\n");
$errors[] = $error;
}
} else {
// Sequentially check files to find the error
$lastGoodFile = null;
foreach ($pluginFiles as $relativePath => $filePath) {
$testCommand = sprintf('php -r %s 1>NUL 2>&1', escapeshellarg(
"error_reporting(E_ALL); ini_set('display_errors', 1); " .
"require_once '" . addslashes($class2Path) . "'; " .
"require_once '" . addslashes($lanAdminPath) . "'; " .
"e107::plugLan('" . addslashes($plug) . "', 'global'); " .
"e107::getConfig()->setPref('plug_installed/" . addslashes($plug) . "', 1); " .
"require_once '" . addslashes($filePath) . "';"
));
exec($testCommand, $testOutput, $testExitCode);
if ($testExitCode !== 0) {
$errorOutput = !empty($testOutput) ? implode("\n", $testOutput) : "Syntax error detected (exit code $testExitCode)";
if (preg_match('/(Parse error|Fatal error|Warning|Notice):.*in\s+([^\s]+)\s+on\s+line\s+(\d+)/i', $errorOutput, $match)) {
$errorMessage = $match[0];
} else {
$errorMessage = $errorOutput;
}
$error = "Error in {$relativePath}: $errorMessage";
fwrite(STDOUT, "$error\n");
$errors[] = $error;
break;
}
$lastGoodFile = $relativePath;
}
if (empty($errors) && $lastGoodFile) {
$error = "Error after {$lastGoodFile}: Syntax error detected (exit code $runExitCode)";
fwrite(STDOUT, "$error\n");
$errors[] = $error;
}
}
}
}
// fwrite(STDOUT, "Debug run command:\n$runCommand\n\n\n\n");
if (!empty($errors)) {
self::fail("Errors found in plugin scripts:\n" . implode("\n", $errors));
}
}
// Execute and capture errors
exec($runCommand, $runOutput, $runExitCode);
if($runExitCode !== 0 || !empty($runOutput))
{
$output = implode("\n", $runOutput);
if(!empty($output))
{
if(preg_match('/(Parse error|Fatal error|Warning|Notice):.*in\s+([^\s]+)\s+on\s+line\s+(\d+)/i', $output, $match))
{
$errorMessage = $match[0];
$errorFile = $match[2];
$relativePath = array_search($errorFile, $pluginFiles) ?: $plug . '/unknown';
$error = "Error in {$relativePath}: $errorMessage";
fwrite(STDOUT, "$error\n");
$errors[] = $error;
}
else
{
$firstLine = strtok($output, "\n");
$error = "Error in {$plug}: $firstLine";
fwrite(STDOUT, "$error\n");
$errors[] = $error;
}
}
else
{
// Sequentially check files to find the error
$lastGoodFile = null;
foreach($pluginFiles as $relativePath => $filePath)
{
$testCommand = sprintf('php -r %s 1>NUL 2>&1', escapeshellarg(
"error_reporting(E_ALL); ini_set('display_errors', 1); " .
"require_once('" . addslashes($class2Path) . "'); " .
"e107::includeLan('" . addslashes($lanAdminPath) . "'); " .
"e107::plugLan('" . addslashes($plug) . "', 'global'); " .
"e107::getConfig()->setPref('plug_installed/" . addslashes($plug) . "', 1); " .
"e107::includeLan('" . addslashes($filePath) . "');"
));
exec($testCommand, $testOutput, $testExitCode);
if($testExitCode !== 0)
{
$errorOutput = !empty($testOutput) ? implode("\n", $testOutput) : "Syntax error detected (exit code $testExitCode)";
if(preg_match('/(Parse error|Fatal error|Warning|Notice):.*in\s+([^\s]+)\s+on\s+line\s+(\d+)/i', $errorOutput, $match))
{
$errorMessage = $match[0];
}
else
{
$errorMessage = $errorOutput;
}
$error = "Error in {$relativePath}: $errorMessage";
fwrite(STDOUT, "$error\n");
$errors[] = $error;
break;
}
$lastGoodFile = $relativePath;
}
if(empty($errors) && $lastGoodFile)
{
$error = "Error after {$lastGoodFile}: Syntax error detected (exit code $runExitCode)";
fwrite(STDOUT, "$error\n");
$errors[] = $error;
}
}
}
}
if(!empty($errors))
{
self::fail("Errors found in plugin scripts:\n" . implode("\n", $errors));
}
}
@@ -541,6 +575,10 @@ public function testPluginScripts()
}
/**
* @runInSeparateProcess
* @return void
*/
public function testPluginAddons()
{
$plg = e107::getPlug()->clearCache();