// Set up autoload
set_include_path(dirname(dirname(dirname(dirname(__FILE__)))) . DIRECTORY_SEPARATOR . 'lib' . PATH_SEPARATOR . get_include_path());
if (!spl_autoload_functions()) {
- spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'::\', \'_\'), \'/\', $class); include "$filename.php";'));
+ spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'\\\', \'_\'), \'/\', $class); include "$filename.php";'));
}
// Test base classes and helper objects
if (strcasecmp($matches[0][0], $class) === 0) {
$relativePath = $replace . '/' . $class;
} else {
- $relativePath = str_replace(array('::', '_'), '/', substr($class, 0, $matches[0][1])) .
+ $relativePath = str_replace(array('\\', '_'), '/', substr($class, 0, $matches[0][1])) .
$replace .
- str_replace(array('::', '_'), '/', substr($class, $matches[0][1] + strlen($matches[0][0])));
+ str_replace(array('\\', '_'), '/', substr($class, $matches[0][1] + strlen($matches[0][0])));
}
if (self::_loadClass($relativePath)) {
}
/* Do a final search in the include path. */
- $relativePath = str_replace(array('::', '_'), '/', $class);
+ $relativePath = str_replace(array('\\', '_'), '/', $class);
return self::_loadClass($relativePath);
}
* Add a new class pattern.
*
* @param string $pattern The class pattern to add.
- * @param string $replace The substitution pattern. All '_' and '::'
+ * @param string $replace The substitution pattern. All '_' and '\'
* strings in a classname will be converted to
* directory separators. If the entire pattern
* is matched, the matched text will be appended
public static function suite()
{
if (!spl_autoload_functions()) {
- spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'::\', \'_\'), \'/\', $class); include "$filename.php";'));
+ spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'\\\', \'_\'), \'/\', $class); include "$filename.php";'));
}
set_include_path(dirname(__FILE__) . '/../../../lib' . PATH_SEPARATOR . get_include_path());
{
set_include_path(dirname(__FILE__) . '/../../../lib' . PATH_SEPARATOR . get_include_path());
if (!spl_autoload_functions()) {
- spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'::\', \'_\'), \'/\', $class); include "$filename.php";'));
+ spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'\\\', \'_\'), \'/\', $class); include "$filename.php";'));
}
$suite = new PHPUnit_Framework_TestSuite('Horde Framework - Horde_Controller');
{
set_include_path(dirname(__FILE__) . '/../../../lib' . PATH_SEPARATOR . get_include_path());
if (!spl_autoload_functions()) {
- spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'::\', \'_\'), \'/\', $class); include "$filename.php";'));
+ spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'\\\', \'_\'), \'/\', $class); include "$filename.php";'));
}
$suite = new PHPUnit_Framework_TestSuite('Horde Framework - Horde_Date');
// Set up include_path and autoloading
set_include_path(dirname(dirname(dirname(dirname(__FILE__)))) . DIRECTORY_SEPARATOR . 'lib' . PATH_SEPARATOR . get_include_path());
if (!spl_autoload_functions()) {
- spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'::\', \'_\'), \'/\', $class); $er = error_reporting(22525); include "$filename.php"; error_reporting($er);'));
+ spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'\\\', \'_\'), \'/\', $class); $er = error_reporting(22525); include "$filename.php"; error_reporting($er);'));
}
// Build the suite
public static function suite()
{
if (!spl_autoload_functions()) {
- spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'::\', \'_\'), \'/\', $class); include "$filename.php";'));
+ spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'\\\', \'_\'), \'/\', $class); include "$filename.php";'));
}
$suite = new PHPUnit_Framework_TestSuite('Horde Framework - Horde_Feed');
{
set_include_path(dirname(__FILE__) . '/../../../lib' . PATH_SEPARATOR . get_include_path());
if (!spl_autoload_functions()) {
- spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'::\', \'_\'), \'/\', $class); include "$filename.php";'));
+ spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'\\\', \'_\'), \'/\', $class); include "$filename.php";'));
}
$suite = new PHPUnit_Framework_TestSuite('Horde Framework - Horde_Http');
public static function suite()
{
if (!spl_autoload_functions()) {
- spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'::\', \'_\'), \'/\', $class); $er = error_reporting(22525); include "$filename.php"; error_reporting($er);'));
+ spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'\\\', \'_\'), \'/\', $class); $er = error_reporting(22525); include "$filename.php"; error_reporting($er);'));
}
set_include_path(dirname(__FILE__) . '/../../../lib' . PATH_SEPARATOR . get_include_path());
public static function suite()
{
if (!spl_autoload_functions()) {
- spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'::\', \'_\'), \'/\', $class); include "$filename.php";'));
+ spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'\\\', \'_\'), \'/\', $class); include "$filename.php";'));
}
set_include_path(dirname(__FILE__) . '/../../../lib' . PATH_SEPARATOR . get_include_path());
{
set_include_path(dirname(dirname(dirname(dirname(__FILE__)))) . DIRECTORY_SEPARATOR . 'lib' . PATH_SEPARATOR . get_include_path());
if (!spl_autoload_functions()) {
- spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'::\', \'_\'), \'/\', $class); include "$filename.php";'));
+ spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'\\\', \'_\'), \'/\', $class); include "$filename.php";'));
}
$suite = new PHPUnit_Framework_TestSuite('Horde Framework - Horde_Pdf');
// Set up autoload
set_include_path(dirname(dirname(dirname(dirname(__FILE__)))) . DIRECTORY_SEPARATOR . 'lib' . PATH_SEPARATOR . get_include_path());
if (!spl_autoload_functions()) {
- spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'::\', \'_\'), \'/\', $class); include "$filename.php";'));
+ spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'\\\', \'_\'), \'/\', $class); include "$filename.php";'));
}
$suite = new PHPUnit_Framework_TestSuite('Horde Framework - Horde_Stream_Filter');
{
set_include_path(dirname(__FILE__) . '/../../../lib' . PATH_SEPARATOR . get_include_path());
if (!spl_autoload_functions()) {
- spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'::\', \'_\'), \'/\', $class); include "$filename.php";'));
+ spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'\\\', \'_\'), \'/\', $class); include "$filename.php";'));
}
$suite = new PHPUnit_Framework_TestSuite('Horde Framework - Horde_Support');
// Set up autoload
set_include_path(dirname(dirname(dirname(dirname(__FILE__)))) . DIRECTORY_SEPARATOR . 'lib' . PATH_SEPARATOR . get_include_path());
if (!spl_autoload_functions()) {
- spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'::\', \'_\'), \'/\', $class); include "$filename.php";'));
+ spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'\\\', \'_\'), \'/\', $class); include "$filename.php";'));
}
// Build the suite
// Set up autoload
set_include_path(dirname(dirname(dirname(dirname(__FILE__)))) . DIRECTORY_SEPARATOR . 'lib' . PATH_SEPARATOR . get_include_path());
if (!spl_autoload_functions()) {
- spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'::\', \'_\'), \'/\', $class); $er = error_reporting(22525); include "$filename.php"; error_reporting($er);'));
+ spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'\\\', \'_\'), \'/\', $class); $er = error_reporting(22525); include "$filename.php"; error_reporting($er);'));
}
// Test helpers
$classnames = array($class, $class_notests, $class_horde, $class_horde_notests, $class_pear2, $class_pear2_notests);
foreach ($classnames as $classname) {
- $classnames[] = str_replace('_', '::', $classname);
+ $classnames[] = str_replace('_', '\\', $classname);
}
// Look for something with a ::suite() method.