1
0
Fork 0

Allow running tests even if Composer is not installed through itself ;-)

pull/100/head
Joseph Bielawski 2011-11-07 19:43:18 +01:00
parent d176f4c07e
commit 17c3e23142
1 changed files with 11 additions and 1 deletions

View File

@ -10,4 +10,14 @@
* file that was distributed with this source code.
*/
require __DIR__.'/../vendor/.composer/autoload.php';
if (file_exists(__DIR__.'/../vendor/.composer/autoload.php')) {
require __DIR__.'/../vendor/.composer/autoload.php';
} else {
require __DIR__.'/../src/Composer/Autoload/ClassLoader.php';
$loader = new Composer\Autoload\ClassLoader();
$loader->add('Composer\\', dirname(__DIR__).'/src/');
$loader->add('Symfony\\Component\\', dirname(__DIR__).'/src/');
$loader->add('Composer_', dirname(__DIR__).'/src/');
$loader->register();
}