/** * Bootstrap code for Horde PEAR packages. * * @param string $dir Base directory of tests. * @param boolean $no_autoload Don't run default Horde_Test autoload * tasks. */ public static function bootstrap($dir, $no_autoload = false) { if (self::$_runonce) { return; } if (!$no_autoload) { // Catch strict standards error_reporting(E_ALL | E_STRICT); // Set up autoload $base = $dir; while ($base != '/' && basename($base) != 'Horde') { $base = dirname($base); } $base = dirname($base); if ($base) { set_include_path($base . PATH_SEPARATOR . $base . '/../lib' . PATH_SEPARATOR . get_include_path()); } require_once 'Horde/Test/Autoload.php'; Horde_Test_Autoload::init(); } if (file_exists($dir . '/Autoload.php')) { require_once $dir . '/Autoload.php'; } self::$_runonce = true; }
/** * Base autoloader code for Horde PEAR packages. */ public static function init() { if (self::$_runonce) { return; } if (file_exists(__DIR__ . '/vendor/autoload.php')) { require __DIR__ . '/vendor/autoload.php'; } else { require __DIR__ . '/../../../bundle/vendor/autoload.php'; } spl_autoload_register(function ($class) { $filename = Horde_Test_Autoload::resolve($class); $err_mask = error_reporting() & ~E_WARNING; $old_err = error_reporting($err_mask); include "{$filename}.php"; error_reporting($old_err); }, true, true); self::$_runonce = true; }
<?php /** * Setup autoloading for the tests. * * PHP version 5 * * @category Horde * @package Kronolith * @subpackage UnitTests * @author Gunnar Wrobel <*****@*****.**> * @link http://www.horde.org/apps/kronolith * @license http://www.horde.org/licenses/gpl GNU General Public License, version 2 */ Horde_Test_Autoload::addPrefix('Kronolith', __DIR__ . '/../../lib'); /** Load the basic test definition */ require_once __DIR__ . '/TestCase.php'; require_once __DIR__ . '/Integration/Driver/Base.php'; require_once __DIR__ . '/Integration/Driver/Sql/Base.php'; require_once __DIR__ . '/Integration/Kronolith/Base.php'; require_once __DIR__ . '/Integration/Kronolith/Sql/Base.php'; /** Load stub definitions */ require_once __DIR__ . '/Stub/Driver.php'; require_once __DIR__ . '/Stub/Registry.php'; require_once __DIR__ . '/Stub/ShareFactory.php'; require_once __DIR__ . '/Stub/Tagger.php'; require_once __DIR__ . '/Stub/Types.php'; require_once __DIR__ . '/Stub/CalendarManager.php';
<?php /** * Setup autoloading for the tests. * * PHP version 5 * * @category Horde * @package Turba * @subpackage UnitTests * @author Gunnar Wrobel <*****@*****.**> * @link http://www.horde.org/apps/turba * @license http://www.horde.org/licenses/apache Apache-like */ Horde_Test_Autoload::addPrefix('Turba', __DIR__ . '/../../lib'); /** Load the basic test definition */ require_once __DIR__ . '/TestCase.php';
<?php /** * Setup autoloading for the tests. * * PHP version 5 * * Copyright 2011-2016 Horde LLC (http://www.horde.org/) * * See the enclosed file COPYING for license information (GPLv2). If * you did not receive this file, see * http://www.horde.org/licenses/gpl. * * @category Horde * @package Wicked * @subpackage UnitTests * @author Gunnar Wrobel <*****@*****.**> * @link http://www.horde.org/apps/wicked * @license http://www.horde.org/licenses/gpl GNU General Public License, version 2 */ Horde_Test_Autoload::addPrefix('Wicked', __DIR__ . '/../../lib'); Horde_Test_Autoload::addPrefix('Text/Wiki/Render/Rst', __DIR__ . '/../../lib/Text_Wiki/Render/Rst'); /** Load the basic test definition */ require_once __DIR__ . '/TestCase.php';
<?php /** * Setup autoloading for the tests. * * PHP version 5 * * Copyright 2009-2014 Horde LLC (http://www.horde.org/) * * See the enclosed file COPYING for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. * * @category Horde * @package Content * @subpackage UnitTests * @author Michael J Rubinsky <*****@*****.**> * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 * @link http://pear.horde.org/index.php?package=Content */ Horde_Test_Autoload::addPrefix('Content', __DIR__ . '/../../lib');
<?php /** * Setup autoloading for the tests. * * @author Michael Slusarz <*****@*****.**> * @category Horde * @ignore * @license http://www.horde.org/licenses/apache ASL * @package Ingo * @subpackage UnitTests */ Horde_Test_Autoload::addPrefix('Ingo', __DIR__ . '/../../lib'); require_once 'Unit/TestBase.php';
<?php /** * Setup autoloading for the tests. * * @category Horde * @copyright 2011-2015 Horde LLC * @internal * @license http://www.horde.org/licenses/gpl GPL * @package Passwd * @subpackage UnitTests */ Horde_Test_Autoload::addPrefix('Passwd', __DIR__ . '/../../lib'); require_once __DIR__ . '/TestCase.php';
<?php Horde_Test_Autoload::addPrefix('Koward', __DIR__ . '../../lib');
<?php /** * Setup autoloading for the tests. * * PHP version 5 * * @category Horde * @package Ansel * @subpackage UnitTests * @author Michael J Rubinsky <*****@*****.**> * @license http://www.horde.org/licenses/gpl GPL-2.0 * @link http://www.horde.org/apps/mnemo */ Horde_Test_Autoload::addPrefix('Ansel', __DIR__ . '/../../lib'); /** Load the basic test definition */ require_once __DIR__ . '/TestCase.php'; require_once __DIR__ . '/Unit/Base.php';