ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilGlobalSuite.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
15 {
16  public static function 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  }
54 }
55 ?>
print $file
$suite
This is the global ILIAS test suite.
static suite()