forked from Behat/Behat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
autoload.php.dist
36 lines (32 loc) · 1.3 KB
/
autoload.php.dist
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
/*
* This file is part of the Behat.
* (c) Konstantin Kudryashov <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
ini_set('include_path',ini_get('include_path').':'.realpath('..'));
if (!class_exists('Behat\Behat\ClassLoader\UniversalClassLoader')) {
require_once __DIR__ . '/src/Behat/Behat/ClassLoader/UniversalClassLoader.php';
}
use Behat\Behat\ClassLoader\UniversalClassLoader;
$vendorDir = __DIR__ . '/vendor';
if (is_dir($vendorDir . '/Gherkin')) {
$gherkinDir = $vendorDir . '/Gherkin';
} else {
$gherkinDir = require_once('gherkin/libpath.php');
}
$loader = new UniversalClassLoader();
$loader->registerNamespaces(array(
'Symfony\Component\Console' => $vendorDir,
'Symfony\Component\DependencyInjection' => $vendorDir,
'Symfony\Component\Config' => $vendorDir,
'Symfony\Component\Translation' => $vendorDir,
'Symfony\Component\EventDispatcher' => $vendorDir,
'Symfony\Component\Finder' => $vendorDir,
'Symfony\Component\Yaml' => $vendorDir,
'Behat\Behat' => __DIR__ . '/src',
'Behat\Gherkin' => $gherkinDir . '/src'
));
$loader->register();