Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 49 lines (41 sloc) 2.025 kB
a79ad89 @fabpot added a way to run tests that depends on external libraries
fabpot authored
1 <?php
2
6997fba @fabpot fixed previous commit
fabpot authored
3 require_once __DIR__.'/src/Symfony/Component/ClassLoader/UniversalClassLoader.php';
a79ad89 @fabpot added a way to run tests that depends on external libraries
fabpot authored
4
935332d @vicb fix autoload
vicb authored
5 use Symfony\Component\ClassLoader\UniversalClassLoader;
9069d06 @beberlei Fix tests to run with Doctrine Common AnnotationRegistry
beberlei authored
6 use Doctrine\Common\Annotations\AnnotationRegistry;
a79ad89 @fabpot added a way to run tests that depends on external libraries
fabpot authored
7
8 $loader = new UniversalClassLoader();
9 $loader->registerNamespaces(array(
2291af4 @fabpot added Locale stubs to the autoloader so that people can run Symfony u…
fabpot authored
10 'Symfony\\Tests' => __DIR__.'/tests',
11 'Symfony' => __DIR__.'/src',
9ed7c03 @blahy fixed code coverage raport generation
blahy authored
12 'Doctrine\\Common\\DataFixtures' => __DIR__.'/vendor/doctrine-fixtures/lib',
2291af4 @fabpot added Locale stubs to the autoloader so that people can run Symfony u…
fabpot authored
13 'Doctrine\\Common' => __DIR__.'/vendor/doctrine-common/lib',
14 'Doctrine\\DBAL' => __DIR__.'/vendor/doctrine-dbal/lib',
15 'Doctrine' => __DIR__.'/vendor/doctrine/lib',
16 'Monolog' => __DIR__.'/vendor/monolog/src',
a79ad89 @fabpot added a way to run tests that depends on external libraries
fabpot authored
17 ));
18 $loader->registerPrefixes(array(
f5de854 @fabpot fixed autoloading for tests
fabpot authored
19 'Twig_' => __DIR__.'/vendor/twig/lib',
a79ad89 @fabpot added a way to run tests that depends on external libraries
fabpot authored
20 ));
8333df6 @fabpot fixed autoloader when tests are run on a machine without intl installed
fabpot authored
21 if (!function_exists('intl_get_error_code')) {
22 require_once __DIR__.'/src/Symfony/Component/Locale/Resources/stubs/functions.php';
23
e585ca7 [HttpFoundation] Added forward compatibility for \SessionHandlerInter…
Drak authored
24 $loader->registerPrefixFallback(__DIR__.'/src/Symfony/Component/Locale/Resources/stubs');
25 }
26 if (!interface_exists('SessionHandlerInterface', false)) {
2871ea0 Update composer for HttpFoundation's PHP 5.4 forward compatibility.
Drak authored
27 $loader->registerPrefix('SessionHandlerInterface', __DIR__.'/src/Symfony/Component/HttpFoundation/Resources/stubs');
8333df6 @fabpot fixed autoloader when tests are run on a machine without intl installed
fabpot authored
28 }
28527c7 @fabpot renamed some UniversalClassLoader for better consistency
fabpot authored
29 $loader->register();
f5de854 @fabpot fixed autoloading for tests
fabpot authored
30
d2f8aa3 @Seldaek Allow autoload to run without vendors being cloned
Seldaek authored
31 if (is_file(__DIR__.'/vendor/doctrine-common/lib/Doctrine/Common/Annotations/AnnotationRegistry.php')) {
32 AnnotationRegistry::registerLoader(function($class) use ($loader) {
33 $loader->loadClass($class);
34 return class_exists($class, false);
35 });
36 if (is_file(__DIR__.'/vendor/doctrine/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php')) {
37 AnnotationRegistry::registerFile(__DIR__.'/vendor/doctrine/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php');
38 }
39 }
9069d06 @beberlei Fix tests to run with Doctrine Common AnnotationRegistry
beberlei authored
40
783f167 @fabpot fixed autoloader when Swiftmailer is not installed
fabpot authored
41 if (is_file(__DIR__.'/vendor/swiftmailer/lib/classes/Swift.php')) {
42 require_once __DIR__.'/vendor/swiftmailer/lib/classes/Swift.php';
43 Swift::registerAutoload(__DIR__.'/vendor/swiftmailer/lib/swift_init.php');
44 }
007de8c @willdurand [Tests] [Propel] Added some tests for the ModelChoiceList class
willdurand authored
45
46 if (is_file($file = __DIR__.'/vendor/propel/runtime/lib/Propel.php')) {
47 require_once $file;
48 }
Something went wrong with that request. Please try again.