register(); require_once($libraryPath . '/Icinga/Test/ClassLoader.php'); $loader = new Icinga\Test\ClassLoader(); $loader->registerNamespace('Tests', $testLibraryPath); $loader->registerNamespace('Icinga', $libraryPath . '/Icinga'); $loader->registerNamespace('Icinga\\Forms', $applicationPath . '/forms'); $modules = scandir($modulePath); foreach ($modules as $module) { if ($module === '.' || $module === '..') { continue; } $moduleNamespace = 'Icinga\\Module\\' . ucfirst($module); $moduleLibraryPath = $modulePath . '/' . $module . '/library/' . ucfirst($module); if (is_dir($moduleLibraryPath)) { $loader->registerNamespace($moduleNamespace, $moduleLibraryPath); } $moduleTestPath = $modulePath . '/' . $module . '/test/php'; if (is_dir($moduleTestPath)) { $loader->registerNamespace('Tests\\' . $moduleNamespace, $moduleTestPath); } $moduleFormPath = $modulePath . '/' . $module . '/application/forms'; if (is_dir($moduleFormPath)) { $loader->registerNamespace($moduleNamespace . '\\Forms', $moduleFormPath); } } $loader->register(); set_include_path( implode( PATH_SEPARATOR, array($libraryPath . '/vendor', get_include_path()) ) ); require_once 'Zend/Loader/Autoloader.php'; \Zend_Loader_Autoloader::getInstance(); Icinga\Application\Config::$configDir = $configPath;