1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-30 19:30:25 +02:00

Support for PHPUnit test.

This commit is contained in:
Cameron
2019-05-04 13:32:38 -07:00
parent 0e66396f16
commit 08756f8040

View File

@@ -3768,6 +3768,8 @@ class e107plugin
$mes = e107::getMessage();
$this->setUe();
$ret = array();
foreach ($array['field'] as $efield)
{
$attrib = $efield['@attributes'];
@@ -3780,8 +3782,14 @@ class e107plugin
$source = 'plugin_'.$this->plugFolder;
$remove = (varset($attrib['deprecate']) == 'true') ? TRUE : FALSE;
if(!isset($attrib['system'])) $attrib['system'] = true; // default true
else $attrib['system'] = $attrib['system'] === 'true' ? true : false;
if(!isset($attrib['system']))
{
$attrib['system'] = true; // default true
}
else
{
$attrib['system'] = ($attrib['system'] === 'true') ? true : false;
}
switch ($function)
{
@@ -3816,9 +3824,18 @@ class e107plugin
$mes->add(EPL_ADLAN_251 .$name, E_MESSAGE_SUCCESS);
}
break;
case 'test': // phpunit
$ret[] = array('name' => $name, 'attrib' => $attrib, 'source' => $source);
break;
}
}
if(!empty($ret))
{
return $ret;
}
return null;
}