* @author Romain Quetiez * @author Denis Flaven * @license http://www.opensource.org/licenses/gpl-3.0.html LGPL */ /////////////////////////////////////////////////////////////////////////////// // Helpers /////////////////////////////////////////////////////////////////////////////// function ReadMandatoryParam($sName) { $value = utils::ReadParam($sName, null); if (is_null($value)) { echo "

Missing mandatory argument $sName

"; exit; } return $value; } function IsAValidTestClass($sClassName) { // Must be a child of TestHandler // if (!is_subclass_of($sClassName, 'TestHandler')) return false; // Must not be abstract // $oReflectionClass = new ReflectionClass($sClassName); if (!$oReflectionClass->isInstantiable()) return false; return true; } function DisplayEvents($aEvents, $sTitle) { echo "

$sTitle

\n"; if (count($aEvents) > 0) { echo "\n"; } else { echo "

none

\n"; } } /////////////////////////////////////////////////////////////////////////////// // Main /////////////////////////////////////////////////////////////////////////////// require_once('../application/utils.inc.php'); require_once('../core/test.class.inc.php'); require_once('testlist.inc.php'); require_once('../core/cmdbobject.class.inc.php'); $sTodo = utils::ReadParam("todo", ""); if ($sTodo == '') { // Show the list of tests // echo "

Existing tests

\n"; echo "