ILIAS  eassessment Revision 61809
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilGlobalSuite Class Reference

This is the global ILIAS test suite. More...

+ Inheritance diagram for ilGlobalSuite:
+ Collaboration diagram for ilGlobalSuite:

Static Public Member Functions

static suite ()

Detailed Description

This is the global ILIAS test suite.

It searches automatically for components test suites by scanning all Modules/.../test and Services/.../test directories for test suite files.

Test suite files are identified automatically, if they are named "ilServices[ServiceName]Suite.php" or ilModules[ModuleName]Suite.php".

Author
alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e

Definition at line 14 of file ilGlobalSuite.php.

Member Function Documentation

static ilGlobalSuite::suite ( )
static

Definition at line 16 of file ilGlobalSuite.php.

References $dir, $file, and $name.

{
$suite = new ilGlobalSuite();
echo "\n";
// scan Modules and Services directories
$basedirs = array("Services", "Modules");
foreach ($basedirs as $basedir)
{
// read current directory
$dir = opendir($basedir);
while($file = readdir($dir))
{
if ($file != "." && $file != ".." && is_dir($basedir."/".$file))
{
$suite_path =
$basedir."/".$file."/test/il".$basedir.$file."Suite.php";
if (is_file($suite_path))
{
include_once($suite_path);
$name = "il".$basedir.$file."Suite";
$s = new $name();
echo "Adding Suite: ".$name."\n";
$suite->addTest($s->suite());
//$suite->addTestSuite("ilSettingTest");
}
}
}
}
echo "\n";
return $suite;
}

The documentation for this class was generated from the following file: