Skip to content
Browse files

made usage of Composer autoloader for subtree-split unit tests

  • Loading branch information...
1 parent 5a119c3 commit 171fa40ebb7027586f7fd9f73e3d6177516957c3 @fabpot fabpot committed
Showing with 6 additions and 29 deletions.
  1. +2 −0 .gitignore
  2. +3 −6 README.md
  3. +0 −22 Tests/bootstrap.php
  4. +1 −1 phpunit.xml.dist
View
2 .gitignore
@@ -1,2 +1,4 @@
vendor/
composer.lock
+phpunit.xml
+
View
9 README.md
@@ -64,9 +64,6 @@ Resources
You can run the unit tests with the following command:
- phpunit
-
-If you also want to run the unit tests that depend on other Symfony
-Components, install dev dependencies before running PHPUnit:
-
- php composer.phar install --dev
+ $ cd path/to/Symfony/Component/ClassLoader/
+ $ composer.phar install --dev
+ $ phpunit
View
22 Tests/bootstrap.php
@@ -1,22 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-spl_autoload_register(function ($class) {
- if (0 === strpos(ltrim($class, '/'), 'Symfony\Component\ClassLoader')) {
- if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\ClassLoader')).'.php')) {
- require_once $file;
- }
- }
-});
-
-if (file_exists($loader = __DIR__.'/../vendor/autoload.php')) {
- require_once $loader;
-}
View
2 phpunit.xml.dist
@@ -9,7 +9,7 @@
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false"
- bootstrap="Tests/bootstrap.php"
+ bootstrap="vendor/autoload.php"
>
<testsuites>
<testsuite name="Symfony ClassLoader Component Test Suite">

0 comments on commit 171fa40

Please sign in to comment.
Something went wrong with that request. Please try again.