<?php

system(sprintf('php %s', escapeshellarg(__DIR__.'/bin/vendors')));

require_once __DIR__.'/'.$_SERVER['SYMFONY'].'/Symfony/Component/ClassLoader/UniversalClassLoader.php';

use Symfony\Component\ClassLoader\UniversalClassLoader;

$loader = new UniversalClassLoader();
$loader->registerNamespaces(array(
    'Symfony' => __DIR__.'/'.$_SERVER['SYMFONY'],
    'Zend'    => __DIR__.'/'.$_SERVER['ZEND']
));
$loader->register();

spl_autoload_register(function($class)
{
    if(strpos($class, 'Ivory\\LuceneSearchBundle\\') === 0)
    {
        $path = __DIR__.'/../'.implode('/', array_slice(explode('\\', $class), 2)).'.php';

        if(!stream_resolve_include_path($path))
            return false;
        
        require_once $path;
        return true;
    }
});

<?php

system(sprintf('php %s/bin/vendors', escapeshellarg(__DIR__)));

require_once __DIR__.'/'.$_SERVER['SYMFONY'].'/Symfony/Component/ClassLoader/UniversalClassLoader.php';

use Symfony\Component\ClassLoader\UniversalClassLoader;

$loader = new UniversalClassLoader();
$loader->registerNamespaces(array(
    'Symfony' => __DIR__.'/'.$_SERVER['SYMFONY'],
    'Zend'    => __DIR__.'/'.$_SERVER['ZEND'],
    'Ivory'   => __DIR__.'/../../..'
));
$loader->register();

--- 
+++ 
@@ -1,6 +1,6 @@
 <?php
 
-system(sprintf('php %s/bin/vendors', escapeshellarg(__DIR__)));
+system(sprintf('php %s', escapeshellarg(__DIR__.'/bin/vendors')));
 
 require_once __DIR__.'/'.$_SERVER['SYMFONY'].'/Symfony/Component/ClassLoader/UniversalClassLoader.php';
 
@@ -9,7 +9,20 @@
 $loader = new UniversalClassLoader();
 $loader->registerNamespaces(array(
     'Symfony' => __DIR__.'/'.$_SERVER['SYMFONY'],
-    'Zend'    => __DIR__.'/'.$_SERVER['ZEND'],
-    'Ivory'   => __DIR__.'/../../..'
+    'Zend'    => __DIR__.'/'.$_SERVER['ZEND']
 ));
 $loader->register();
+
+spl_autoload_register(function($class)
+{
+    if(strpos($class, 'Ivory\\LuceneSearchBundle\\') === 0)
+    {
+        $path = __DIR__.'/../'.implode('/', array_slice(explode('\\', $class), 2)).'.php';
+
+        if(!stream_resolve_include_path($path))
+            return false;
+        
+        require_once $path;
+        return true;
+    }
+});
Update boostrap to allow running the test suite outside a dummy project
