function testFunc()
 {
     $loader = new BasePathClassLoader(array('tests/lib'));
     $loader->register();
     ok($loader);
     spl_autoload_call('Foo\\Bar');
     ok(class_exists('Foo\\Bar'));
     $loader->unregister();
 }
Example #2
0
<?php

require 'Universal/ClassLoader/BasePathClassLoader.php';
use Universal\ClassLoader\BasePathClassLoader;
$loader = new BasePathClassLoader(array(__DIR__ . '/src', __DIR__ . '/vendor/pear'));
$loader->useIncludePath(true);
$loader->register();