summaryrefslogtreecommitdiff
path: root/test/KolabAdmin/Autoload.php
diff options
context:
space:
mode:
Diffstat (limited to 'test/KolabAdmin/Autoload.php')
-rw-r--r--test/KolabAdmin/Autoload.php30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/KolabAdmin/Autoload.php b/test/KolabAdmin/Autoload.php
new file mode 100644
index 0000000..60ee9ac
--- /dev/null
+++ b/test/KolabAdmin/Autoload.php
@@ -0,0 +1,30 @@
+<?php
+/**
+ * Setup autoloading for the tests.
+ *
+ * PHP version 5
+ *
+ * @category Kolab
+ * @package KolabAdmin
+ * @author Gunnar Wrobel <wrobel@pardus.de>
+ * @license http://www.fsf.org/copyleft/lgpl.html LGPL
+ * @link http://pear.horde.org/index.php?package=KolabAdmin
+ */
+
+ini_set('include_path', dirname(__FILE__) . '/../../lib' . PATH_SEPARATOR . ini_get('include_path'));
+
+if (!spl_autoload_functions()) {
+ spl_autoload_register(
+ create_function(
+ '$class',
+ '$filename = str_replace(array(\'::\', \'_\'), \'/\', $class);'
+ . '$err_mask = E_ALL ^ E_WARNING;'
+ . '$oldErrorReporting = error_reporting($err_mask);'
+ . 'include "$filename.php";'
+ . 'error_reporting($oldErrorReporting);'
+ )
+ );
+}
+
+/** Catch strict standards */
+error_reporting(E_ALL | E_STRICT);