mirror of
https://github.com/e107inc/e107.git
synced 2025-04-20 20:51:53 +02:00
Revert "Removed failing test with no assertions"
This reverts commit 22e3f5383e5a62a3a8a1b6f7828c515402aa8123.
This commit is contained in:
parent
7cfc79d335
commit
687db04bcb
@ -133,6 +133,83 @@
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function testPluginScripts()
|
||||
{
|
||||
|
||||
$core = e107::getPlug()->getCorePluginList();
|
||||
|
||||
$exclude = array(
|
||||
'forum/forum_post.php',
|
||||
'forum/forum_viewtopic.php', // needs a major cleanup.
|
||||
'forum/index.php',
|
||||
'online/online_menu.php', // FIXME missing template for member/new
|
||||
'pm/pm.php', // FIXME contains exit, needs rework.
|
||||
'poll/admin_config.php', // FIXME convert to admin-ui
|
||||
'rss_menu/rss.php', // FIXME rework code into class.
|
||||
'tagcloud/tagcloud_menu.php', // FIXME - strange (PHP bug?), doesn't see the render() method.
|
||||
'tinymce4/wysiwyg.php', // javascript generator.
|
||||
);
|
||||
|
||||
//DEBUG A SPECIFIC FILE : dir => file
|
||||
// $focus = array('tagcloud'=>'tagcloud_menu.php');
|
||||
|
||||
|
||||
foreach($core as $plug)
|
||||
{
|
||||
$parm = null; //
|
||||
e107::plugLan($plug, 'global'); // load global language (usually done in class2.php)
|
||||
e107::getConfig()->setPref('plug_installed/'.$plug, 1); // simulate installed.
|
||||
|
||||
$path = e_PLUGIN.$plug;
|
||||
$files = scandir($path);
|
||||
unset($files[0], $files[1]); // . and ..
|
||||
|
||||
if(!empty($focus) && !isset($focus[$plug]))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
foreach($files as $f)
|
||||
{
|
||||
$filePath = $path.'/'.$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;
|
||||
}
|
||||
|
||||
// echo " --- ".$filePath." --- \n";
|
||||
if(empty($focus))
|
||||
{
|
||||
ob_start();
|
||||
}
|
||||
require_once( $filePath);
|
||||
if(empty($focus))
|
||||
{
|
||||
ob_end_clean();
|
||||
}
|
||||
// echo $plug.'/'.$f."\n";
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @see https://github.com/e107inc/e107/issues/3547
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user