1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-04 13:47:31 +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(); $mes = e107::getMessage();
$this->setUe(); $this->setUe();
$ret = array();
foreach ($array['field'] as $efield) foreach ($array['field'] as $efield)
{ {
$attrib = $efield['@attributes']; $attrib = $efield['@attributes'];
@@ -3780,8 +3782,14 @@ class e107plugin
$source = 'plugin_'.$this->plugFolder; $source = 'plugin_'.$this->plugFolder;
$remove = (varset($attrib['deprecate']) == 'true') ? TRUE : FALSE; $remove = (varset($attrib['deprecate']) == 'true') ? TRUE : FALSE;
if(!isset($attrib['system'])) $attrib['system'] = true; // default true if(!isset($attrib['system']))
else $attrib['system'] = $attrib['system'] === 'true' ? true : false; {
$attrib['system'] = true; // default true
}
else
{
$attrib['system'] = ($attrib['system'] === 'true') ? true : false;
}
switch ($function) switch ($function)
{ {
@@ -3816,9 +3824,18 @@ class e107plugin
$mes->add(EPL_ADLAN_251 .$name, E_MESSAGE_SUCCESS); $mes->add(EPL_ADLAN_251 .$name, E_MESSAGE_SUCCESS);
} }
break; break;
case 'test': // phpunit
$ret[] = array('name' => $name, 'attrib' => $attrib, 'source' => $source);
break;
} }
} }
if(!empty($ret))
{
return $ret;
}
return null; return null;
} }