summaryrefslogtreecommitdiffstats
path: root/phpspec-autoload.php
blob: 47f19c5652170ef14f3b1645e73d634994d0e85e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php
/* not namespaced, use classs-map */
require_once 'phpspec/php-diff/autoload.php';
/* prophecy and its dependencies */
require_once 'Prophecy/autoload.php';

$vendorDir = '/usr/share/php';
require_once $vendorDir . '/Symfony/Component/ClassLoader/UniversalClassLoader.php';
use Symfony\Component\ClassLoader\UniversalClassLoader;

$loader = new UniversalClassLoader();
$ns = array(
    'Doctrine\\Instantiator'              => $vendorDir,
    'SebastianBergmann'                   => $vendorDir,
    'Symfony\\Component'                  => $vendorDir,
    'PhpSpec'                             => dirname(__DIR__),
);
/* spec tree in current dir, when exists */
if (is_dir(getcwd().'/spec')) {
    $ns['spec'] = getcwd();
}
$loader->registerNamespaces($ns);
$loader->register();