Code

Moved ListTest from main root to a tests directory.
[gosa.git] / test
1 #!/usr/bin/php
3 <?php
6 /* This is good for testing... */
7 error_reporting (E_ALL | E_STRICT);
9 /* Escape all preg_* relevant characters */
10 function normalizePreg($input)
11 {
12   return (addcslashes($input, '[]()|/.*+-'));
13 }
17 /* Initiate autoloader... */
18 require_once("include/autoload.inc");
19 restore_error_handler();
20 try {
22         /* Get new test instance of the Configuration */
23         $cr= Registry::getInstance("ConfigManager");
24         $cr->load("gosa.conf");
26         /* Get a new test instance of ObjectListViewports */
27         $vp= new ObjectListViewport("plugin/sample");
28         echo $vp->render();
30 } catch (Exception $e) {
31         echo "\n-GOsa Exception-----------------------------------------------------------\n\n".
32              $e->__toString().
33              "\n\n--------------------------------------------------------------------------\n\n";
34 }
36 exit (0);
38 ?>