Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from renoirb/run-tests-on-self-contained-env
[PATCH] phpunit and test bootstrap refactor
- Loading branch information
Showing
3 changed files
with
16 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
vendor/ | ||
composer.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,12 @@ | ||
<?php | ||
|
||
require_once $_SERVER['SYMFONY'].'/Symfony/Component/ClassLoader/UniversalClassLoader.php'; | ||
|
||
use Symfony\Component\ClassLoader\UniversalClassLoader; | ||
|
||
$loader = new UniversalClassLoader(); | ||
$loader->registerNamespace('Symfony', $_SERVER['SYMFONY']); | ||
$loader->register(); | ||
|
||
spl_autoload_register(function($class) | ||
{ | ||
if (0 === strpos($class, 'Overblog\\MediaWiki\\')) { | ||
$path = implode('/', array_slice(explode('\\', $class), 2)).'.php'; | ||
require_once __DIR__.'/../'.$path; | ||
return true; | ||
} | ||
}); | ||
if (!($loader = @include __DIR__ . '/../vendor/autoload.php')) { | ||
die(<<<'EOT' | ||
You must set up the project dependencies, run the following commands: | ||
wget http://getcomposer.org/composer.phar | ||
php composer.phar install | ||
EOT | ||
); | ||
} | ||
|
||
return $loader; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters