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

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