ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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

◆ suite()

static ilGlobalSuite::suite ( )
static

Definition at line 16 of file ilGlobalSuite.php.

References $file, and $suite.

17  {
18  $suite = new ilGlobalSuite();
19 
20  require_once('include/inc.get_pear.php');
21  echo "\n";
22 
23  // scan Modules and Services directories
24  $basedirs = array("Services", "Modules");
25 
26  foreach ($basedirs as $basedir)
27  {
28  // read current directory
29  $dir = opendir($basedir);
30 
31  while($file = readdir($dir))
32  {
33  if ($file != "." && $file != ".." && is_dir($basedir."/".$file))
34  {
35  $suite_path =
36  $basedir."/".$file."/test/il".$basedir.$file."Suite.php";
37  if (is_file($suite_path))
38  {
39  include_once($suite_path);
40 
41  $name = "il".$basedir.$file."Suite";
42  $s = new $name();
43  echo "Adding Suite: ".$name."\n";
44  $suite->addTest($s->suite());
45  //$suite->addTestSuite("ilSettingTest");
46  }
47  }
48  }
49  }
50  echo "\n";
51 
52  return $suite;
53  }
print $file
$suite
This is the global ILIAS test suite.

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