Code

Updated viewport
[gosa.git] / test
1 #!/usr/bin/php
2 <?php
4 /* This is good for testing... */
5 error_reporting (E_ALL | E_STRICT);
7 /* Escape all preg_* relevant characters */
8 function normalizePreg($input)
9 {
10   return (addcslashes($input, '[]()|/.*+-'));
11 }
15 /* Initiate autoloader... */
16 require_once("include/autoload.inc");
17 restore_error_handler();
18 try {
20         /* Get new test instance of the Configuration */
21         $cr= Registry::getInstance("ConfigManager");
22         $cr->load("gosa.conf");
24         /* Get a new test instance of ObjectListViewports */
25         $vp= new ObjectListViewport("plugin/sample");
26         echo $vp->render();
28 } catch (Exception $e) {
29         echo "\n-GOsa Exception-----------------------------------------------------------\n\n".
30              $e->__toString().
31              "\n\n--------------------------------------------------------------------------\n\n";
32 }
34 exit (0);
36 ?>