diff --git a/src/Symfony/Bridge/Doctrine/.gitignore b/src/Symfony/Bridge/Doctrine/.gitignore new file mode 100644 index 0000000000..44de97a36a --- /dev/null +++ b/src/Symfony/Bridge/Doctrine/.gitignore @@ -0,0 +1,4 @@ +vendor/ +composer.lock +phpunit.xml + diff --git a/src/Symfony/Bridge/Doctrine/README.md b/src/Symfony/Bridge/Doctrine/README.md index 211eb7fb61..9aecb01e3f 100644 --- a/src/Symfony/Bridge/Doctrine/README.md +++ b/src/Symfony/Bridge/Doctrine/README.md @@ -9,20 +9,6 @@ Resources You can run the unit tests with the following command: - phpunit -c src/Symfony/Bridge/Doctrine/ - -If you also want to run the unit tests that depend on other Symfony -Components, declare the following environment variables before running -PHPUnit: - - export DOCTRINE_COMMON=../path/to/doctrine-common - export DOCTRINE_DBAL=../path/to/doctrine-dbal - export DOCTRINE_ORM=../path/to/doctrine - export DOCTRINE_FIXTURES=../path/to/doctrine-fixtures - export SYMFONY_HTTP_FOUNDATION=../path/to/HttpFoundation - export SYMFONY_DEPENDENCY_INJECTION=../path/to/DependencyInjection - export SYMFONY_FORM=../path/to/Form - export SYMFONY_SECURITY=../path/to/Security - export SYMFONY_VALIDATOR=../path/to/Validator - export SYMFONY_HTTP_KERNEL=../path/to/HttpKernel - export SYMFONY_EVENT_DISPATCHER=../path/to/EventDispatcher + $ cd path/to/Symfony/Bridge/Doctrine/ + $ composer.phar install --dev + $ phpunit diff --git a/src/Symfony/Bridge/Doctrine/Tests/bootstrap.php b/src/Symfony/Bridge/Doctrine/Tests/bootstrap.php index 994592e22e..7912352895 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/bootstrap.php +++ b/src/Symfony/Bridge/Doctrine/Tests/bootstrap.php @@ -9,62 +9,6 @@ * file that was distributed with this source code. */ -spl_autoload_register($loader = function ($class) { - foreach (array( - 'SYMFONY_HTTP_FOUNDATION' => 'HttpFoundation', - 'SYMFONY_DEPENDENCY_INJECTION' => 'DependencyInjection', - 'SYMFONY_FORM' => 'Form', - 'SYMFONY_SECURITY' => 'Security', - 'SYMFONY_VALIDATOR' => 'Validator', - 'SYMFONY_HTTP_KERNEL' => 'HttpKernel', - 'SYMFONY_EVENT_DISPATCHER' => 'EventDispatcher', - ) as $env => $name) { - if (isset($_SERVER[$env]) && 0 === strpos(ltrim($class, '/'), 'Symfony\Component\\'.$name)) { - if (file_exists($file = $_SERVER[$env].'/'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\\'.$name)).'.php')) { - require_once $file; - } - } - } +$loader = require __DIR__.'/../vendor/autoload.php'; - if (isset($_SERVER['SYMFONY_HTTP_FOUNDATION']) && 'SessionHandlerInterface' === ltrim($class, '/')) { - require_once $_SERVER['SYMFONY_HTTP_FOUNDATION'].'/Resources/stubs/SessionHandlerInterface.php'; - } - - if (isset($_SERVER['DOCTRINE_FIXTURES']) && 0 === strpos(ltrim($class, '/'), 'Doctrine\Common\DataFixtures')) { - if (file_exists($file = $_SERVER['DOCTRINE_FIXTURES'].'/lib/'.str_replace('\\', '/', $class).'.php')) { - require_once $file; - } - } - - if (isset($_SERVER['DOCTRINE_COMMON']) && 0 === strpos(ltrim($class, '/'), 'Doctrine\Common')) { - if (file_exists($file = $_SERVER['DOCTRINE_COMMON'].'/lib/'.str_replace('\\', '/', $class).'.php')) { - require_once $file; - } - } - - if (isset($_SERVER['DOCTRINE_DBAL']) && 0 === strpos(ltrim($class, '/'), 'Doctrine\DBAL')) { - if (file_exists($file = $_SERVER['DOCTRINE_DBAL'].'/lib/'.str_replace('\\', '/', $class).'.php')) { - require_once $file; - } - } - - if (isset($_SERVER['DOCTRINE_ORM']) && 0 === strpos(ltrim($class, '/'), 'Doctrine\ORM')) { - if (file_exists($file = $_SERVER['DOCTRINE_ORM'].'/lib/'.str_replace('\\', '/', $class).'.php')) { - require_once $file; - } - } - - if (0 === strpos(ltrim($class, '/'), 'Symfony\Bridge\Doctrine')) { - if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Bridge\Doctrine')).'.php')) { - require_once $file; - } - } -}); - -if (isset($_SERVER['DOCTRINE_COMMON'])) { - Doctrine\Common\Annotations\AnnotationRegistry::registerLoader(function($class) use ($loader) { - $loader($class); - - return class_exists($class, false); - }); -} +Doctrine\Common\Annotations\AnnotationRegistry::registerLoader(array($loader, 'loadClass')); diff --git a/src/Symfony/Bridge/Doctrine/composer.json b/src/Symfony/Bridge/Doctrine/composer.json index b65b8cbcd9..e93d63820e 100644 --- a/src/Symfony/Bridge/Doctrine/composer.json +++ b/src/Symfony/Bridge/Doctrine/composer.json @@ -20,7 +20,18 @@ "doctrine/common": ">=2.2,<2.4-dev" }, "require-dev": { +<<<<<<< HEAD "symfony/stopwatch": "2.2.*" +======= + "symfony/dependency-injection": "2.2.*", + "symfony/form": "2.2.*", + "symfony/http-kernel": "2.2.*", + "symfony/security": "2.2.*", + "symfony/validator": "2.2.*", + "doctrine/data-fixtures": "1.0.*", + "doctrine/dbal": ">=2.2,<2.4-dev", + "doctrine/orm": ">=2.2.3,<2.4-dev" +>>>>>>> fabpot/tests-in-components }, "suggest": { "symfony/form": "2.2.*", diff --git a/src/Symfony/Bridge/Doctrine/phpunit.xml.dist b/src/Symfony/Bridge/Doctrine/phpunit.xml.dist index 779a6e0503..c8f58f3232 100644 --- a/src/Symfony/Bridge/Doctrine/phpunit.xml.dist +++ b/src/Symfony/Bridge/Doctrine/phpunit.xml.dist @@ -9,7 +9,7 @@ processIsolation="false" stopOnFailure="false" syntaxCheck="false" - bootstrap="tests/bootstrap.php" + bootstrap="Tests/bootstrap.php" > diff --git a/src/Symfony/Bridge/Monolog/.gitignore b/src/Symfony/Bridge/Monolog/.gitignore new file mode 100644 index 0000000000..44de97a36a --- /dev/null +++ b/src/Symfony/Bridge/Monolog/.gitignore @@ -0,0 +1,4 @@ +vendor/ +composer.lock +phpunit.xml + diff --git a/src/Symfony/Bridge/Monolog/README.md b/src/Symfony/Bridge/Monolog/README.md index 111f673e0e..4e2253c5ea 100644 --- a/src/Symfony/Bridge/Monolog/README.md +++ b/src/Symfony/Bridge/Monolog/README.md @@ -8,11 +8,6 @@ Resources You can run the unit tests with the following command: - phpunit -c src/Symfony/Bridge/Monolog/ - -If you also want to run the unit tests that depend on other Symfony -Components, declare the following environment variables before running -PHPUnit: - - export MONOLOG=../path/to/Monolog - export SYMFONY_HTTP_FOUNDATION=../path/to/HttpFoundation + $ cd path/to/Symfony/Bridge/Monolog/ + $ composer.phar install --dev + $ phpunit diff --git a/src/Symfony/Bridge/Monolog/Tests/bootstrap.php b/src/Symfony/Bridge/Monolog/Tests/bootstrap.php deleted file mode 100644 index 571a8ef021..0000000000 --- a/src/Symfony/Bridge/Monolog/Tests/bootstrap.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -spl_autoload_register(function ($class) { - foreach (array( - 'SYMFONY_HTTP_FOUNDATION' => 'HttpFoundation', - ) as $env => $name) { - if (isset($_SERVER[$env]) && 0 === strpos(ltrim($class, '/'), 'Symfony\Component\\'.$name)) { - if (file_exists($file = $_SERVER[$env].'/'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\\'.$name)).'.php')) { - require_once $file; - } - } - } - - if (isset($_SERVER['MONOLOG']) && 0 === strpos(ltrim($class, '/'), 'Monolog')) { - if (file_exists($file = $_SERVER['MONOLOG'].'/src/'.str_replace('\\', '/', $class).'.php')) { - require_once $file; - } - } - - if (0 === strpos(ltrim($class, '/'), 'Symfony\Bridge\Monolog')) { - if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Bridge\Monolog')).'.php')) { - require_once $file; - } - } -}); diff --git a/src/Symfony/Bridge/Monolog/phpunit.xml.dist b/src/Symfony/Bridge/Monolog/phpunit.xml.dist index f26e3fa075..9dca6482fc 100644 --- a/src/Symfony/Bridge/Monolog/phpunit.xml.dist +++ b/src/Symfony/Bridge/Monolog/phpunit.xml.dist @@ -9,7 +9,7 @@ processIsolation="false" stopOnFailure="false" syntaxCheck="false" - bootstrap="tests/bootstrap.php" + bootstrap="vendor/autoload.php" > diff --git a/src/Symfony/Bridge/Propel1/.gitignore b/src/Symfony/Bridge/Propel1/.gitignore new file mode 100644 index 0000000000..44de97a36a --- /dev/null +++ b/src/Symfony/Bridge/Propel1/.gitignore @@ -0,0 +1,4 @@ +vendor/ +composer.lock +phpunit.xml + diff --git a/src/Symfony/Bridge/Propel1/README.md b/src/Symfony/Bridge/Propel1/README.md index 0c336a30bb..abf786e0be 100644 --- a/src/Symfony/Bridge/Propel1/README.md +++ b/src/Symfony/Bridge/Propel1/README.md @@ -8,15 +8,6 @@ Resources You can run the unit tests with the following command: - phpunit -c src/Symfony/Bridge/Propel/ - -If you also want to run the unit tests that depend on other Symfony -Components, declare the following environment variables before running -PHPUnit: - - export PROPEL1=../path/to/Propel - export SYMFONY_HTTP_FOUNDATION=../path/to/HttpFoundation - export SYMFONY_HTTP_KERNEL=../path/to/HttpKernel - export SYMFONY_FORM=../path/to/Form - export SYMFONY_EVENT_DISPATCHER=../path/to/EventDispatcher - export SYMFONY_OPTIONS_RESOLVER=../path/to/OptionsResolver \ No newline at end of file + $ cd path/to/Symfony/Bridge/Propel1/ + $ composer.phar install --dev + $ phpunit diff --git a/src/Symfony/Bridge/Propel1/Tests/bootstrap.php b/src/Symfony/Bridge/Propel1/Tests/bootstrap.php deleted file mode 100644 index 2ace36bc5a..0000000000 --- a/src/Symfony/Bridge/Propel1/Tests/bootstrap.php +++ /dev/null @@ -1,36 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -spl_autoload_register(function ($class) { - foreach (array( - 'SYMFONY_HTTP_FOUNDATION' => 'HttpFoundation', - 'SYMFONY_HTTP_KERNEL' => 'HttpKernel', - 'SYMFONY_FORM' => 'Form', - 'SYMFONY_EVENT_DISPATCHER' => 'EventDispatcher', - 'SYMFONY_OPTIONS_RESOLVER' => 'OptionsResolver', - ) as $env => $name) { - if (isset($_SERVER[$env]) && 0 === strpos(ltrim($class, '/'), 'Symfony\Component\\'.$name)) { - if (file_exists($file = $_SERVER[$env].'/'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\\'.$name)).'.php')) { - require_once $file; - } - } - } - - if (0 === strpos(ltrim($class, '/'), 'Symfony\Bridge\Propel1')) { - if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Bridge\Propel1')).'.php')) { - require_once $file; - } - } -}); - -if (isset($_SERVER['PROPEL1']) && is_file($file = $_SERVER['PROPEL1'].'/runtime/lib/Propel.php')) { - require_once $file; -} diff --git a/src/Symfony/Bridge/Propel1/phpunit.xml.dist b/src/Symfony/Bridge/Propel1/phpunit.xml.dist index ae1d6cdee2..7a5c82b5ff 100644 --- a/src/Symfony/Bridge/Propel1/phpunit.xml.dist +++ b/src/Symfony/Bridge/Propel1/phpunit.xml.dist @@ -9,7 +9,7 @@ processIsolation="false" stopOnFailure="false" syntaxCheck="false" - bootstrap="Tests/bootstrap.php" + bootstrap="vendor/autoload.php" > diff --git a/src/Symfony/Bridge/Twig/.gitignore b/src/Symfony/Bridge/Twig/.gitignore index d1502b087b..44de97a36a 100644 --- a/src/Symfony/Bridge/Twig/.gitignore +++ b/src/Symfony/Bridge/Twig/.gitignore @@ -1,2 +1,4 @@ vendor/ composer.lock +phpunit.xml + diff --git a/src/Symfony/Bridge/Twig/README.md b/src/Symfony/Bridge/Twig/README.md index 80cf13b3cf..e5663236dd 100644 --- a/src/Symfony/Bridge/Twig/README.md +++ b/src/Symfony/Bridge/Twig/README.md @@ -10,6 +10,6 @@ Resources If you want to run the unit tests, install dev dependencies before running PHPUnit: - php composer.phar install --dev - - phpunit + $ cd path/to/Symfony/Bridge/Twig/ + $ composer.phar install --dev + $ phpunit diff --git a/src/Symfony/Bridge/Twig/Tests/bootstrap.php b/src/Symfony/Bridge/Twig/Tests/bootstrap.php deleted file mode 100644 index dffd6eb419..0000000000 --- a/src/Symfony/Bridge/Twig/Tests/bootstrap.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -if (file_exists($loader = __DIR__.'/../vendor/autoload.php')) { - require_once $loader; -} diff --git a/src/Symfony/Bridge/Twig/phpunit.xml.dist b/src/Symfony/Bridge/Twig/phpunit.xml.dist index f0f8181022..cc9e0e86b1 100644 --- a/src/Symfony/Bridge/Twig/phpunit.xml.dist +++ b/src/Symfony/Bridge/Twig/phpunit.xml.dist @@ -9,7 +9,7 @@ processIsolation="false" stopOnFailure="false" syntaxCheck="false" - bootstrap="Tests/bootstrap.php" + bootstrap="vendor/autoload.php" > diff --git a/src/Symfony/Component/BrowserKit/.gitignore b/src/Symfony/Component/BrowserKit/.gitignore index d1502b087b..44de97a36a 100644 --- a/src/Symfony/Component/BrowserKit/.gitignore +++ b/src/Symfony/Component/BrowserKit/.gitignore @@ -1,2 +1,4 @@ vendor/ composer.lock +phpunit.xml + diff --git a/src/Symfony/Component/BrowserKit/README.md b/src/Symfony/Component/BrowserKit/README.md index 061c2d7d6b..da19188362 100644 --- a/src/Symfony/Component/BrowserKit/README.md +++ b/src/Symfony/Component/BrowserKit/README.md @@ -18,9 +18,6 @@ provided by the HttpKernel component. 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/BrowserKit/ + $ composer.phar install --dev + $ phpunit diff --git a/src/Symfony/Component/BrowserKit/Tests/bootstrap.php b/src/Symfony/Component/BrowserKit/Tests/bootstrap.php deleted file mode 100644 index 1b326ffd2e..0000000000 --- a/src/Symfony/Component/BrowserKit/Tests/bootstrap.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * 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\BrowserKit')) { - if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\BrowserKit')).'.php')) { - require_once $file; - } - } -}); - -if (file_exists($loader = __DIR__.'/../vendor/autoload.php')) { - require_once $loader; -} diff --git a/src/Symfony/Component/BrowserKit/phpunit.xml.dist b/src/Symfony/Component/BrowserKit/phpunit.xml.dist index 0ddabeda0e..8dff1ea1f9 100644 --- a/src/Symfony/Component/BrowserKit/phpunit.xml.dist +++ b/src/Symfony/Component/BrowserKit/phpunit.xml.dist @@ -9,7 +9,7 @@ processIsolation="false" stopOnFailure="false" syntaxCheck="false" - bootstrap="Tests/bootstrap.php" + bootstrap="vendor/autoload.php" > diff --git a/src/Symfony/Component/ClassLoader/.gitignore b/src/Symfony/Component/ClassLoader/.gitignore index d1502b087b..44de97a36a 100644 --- a/src/Symfony/Component/ClassLoader/.gitignore +++ b/src/Symfony/Component/ClassLoader/.gitignore @@ -1,2 +1,4 @@ vendor/ composer.lock +phpunit.xml + diff --git a/src/Symfony/Component/ClassLoader/README.md b/src/Symfony/Component/ClassLoader/README.md index 64dffe9a68..5ac31c6489 100644 --- a/src/Symfony/Component/ClassLoader/README.md +++ b/src/Symfony/Component/ClassLoader/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 diff --git a/src/Symfony/Component/ClassLoader/Tests/bootstrap.php b/src/Symfony/Component/ClassLoader/Tests/bootstrap.php deleted file mode 100644 index 54dac3fd26..0000000000 --- a/src/Symfony/Component/ClassLoader/Tests/bootstrap.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * 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; -} diff --git a/src/Symfony/Component/ClassLoader/phpunit.xml.dist b/src/Symfony/Component/ClassLoader/phpunit.xml.dist index ae7e2ad951..0d29c11532 100644 --- a/src/Symfony/Component/ClassLoader/phpunit.xml.dist +++ b/src/Symfony/Component/ClassLoader/phpunit.xml.dist @@ -9,7 +9,7 @@ processIsolation="false" stopOnFailure="false" syntaxCheck="false" - bootstrap="Tests/bootstrap.php" + bootstrap="vendor/autoload.php" > diff --git a/src/Symfony/Component/Config/.gitignore b/src/Symfony/Component/Config/.gitignore new file mode 100644 index 0000000000..44de97a36a --- /dev/null +++ b/src/Symfony/Component/Config/.gitignore @@ -0,0 +1,4 @@ +vendor/ +composer.lock +phpunit.xml + diff --git a/src/Symfony/Component/Config/README.md b/src/Symfony/Component/Config/README.md index e87363df2d..c7865b3815 100644 --- a/src/Symfony/Component/Config/README.md +++ b/src/Symfony/Component/Config/README.md @@ -11,4 +11,7 @@ Resources You can run the unit tests with the following command: - phpunit + $ cd path/to/Symfony/Component/Config/ + $ composer.phar install --dev + $ phpunit + diff --git a/src/Symfony/Component/Config/Tests/bootstrap.php b/src/Symfony/Component/Config/Tests/bootstrap.php deleted file mode 100644 index 3a61b6d59d..0000000000 --- a/src/Symfony/Component/Config/Tests/bootstrap.php +++ /dev/null @@ -1,18 +0,0 @@ - - * - * 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\Config')) { - if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\Config')).'.php')) { - require_once $file; - } - } -}); diff --git a/src/Symfony/Component/Config/phpunit.xml.dist b/src/Symfony/Component/Config/phpunit.xml.dist index e0195190ea..7ba6e55234 100644 --- a/src/Symfony/Component/Config/phpunit.xml.dist +++ b/src/Symfony/Component/Config/phpunit.xml.dist @@ -9,7 +9,7 @@ processIsolation="false" stopOnFailure="false" syntaxCheck="false" - bootstrap="Tests/bootstrap.php" + bootstrap="vendor/autoload.php" > diff --git a/src/Symfony/Component/Console/.gitignore b/src/Symfony/Component/Console/.gitignore new file mode 100644 index 0000000000..44de97a36a --- /dev/null +++ b/src/Symfony/Component/Console/.gitignore @@ -0,0 +1,4 @@ +vendor/ +composer.lock +phpunit.xml + diff --git a/src/Symfony/Component/Console/README.md b/src/Symfony/Component/Console/README.md index 4f234e034d..fbf05fc853 100644 --- a/src/Symfony/Component/Console/README.md +++ b/src/Symfony/Component/Console/README.md @@ -45,7 +45,9 @@ Tests You can run the unit tests with the following command: - phpunit + $ cd path/to/Symfony/Component/Console/ + $ composer.phar install --dev + $ phpunit Third Party ----------- diff --git a/src/Symfony/Component/Console/Tests/bootstrap.php b/src/Symfony/Component/Console/Tests/bootstrap.php deleted file mode 100644 index c486b72642..0000000000 --- a/src/Symfony/Component/Console/Tests/bootstrap.php +++ /dev/null @@ -1,18 +0,0 @@ - - * - * 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\Console')) { - if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\Console')).'.php')) { - require_once $file; - } - } -}); diff --git a/src/Symfony/Component/Console/phpunit.xml.dist b/src/Symfony/Component/Console/phpunit.xml.dist index fd1c069fea..8a7edd46af 100644 --- a/src/Symfony/Component/Console/phpunit.xml.dist +++ b/src/Symfony/Component/Console/phpunit.xml.dist @@ -9,7 +9,7 @@ processIsolation="false" stopOnFailure="false" syntaxCheck="false" - bootstrap="Tests/bootstrap.php" + bootstrap="vendor/autoload.php" > diff --git a/src/Symfony/Component/CssSelector/.gitignore b/src/Symfony/Component/CssSelector/.gitignore new file mode 100644 index 0000000000..44de97a36a --- /dev/null +++ b/src/Symfony/Component/CssSelector/.gitignore @@ -0,0 +1,4 @@ +vendor/ +composer.lock +phpunit.xml + diff --git a/src/Symfony/Component/CssSelector/README.md b/src/Symfony/Component/CssSelector/README.md index dd92f7a82c..2424bea90a 100644 --- a/src/Symfony/Component/CssSelector/README.md +++ b/src/Symfony/Component/CssSelector/README.md @@ -20,4 +20,6 @@ Current code is a port of https://github.com/SimonSapin/cssselect@fd2e70 You can run the unit tests with the following command: - phpunit + $ cd path/to/Symfony/Component/CssSelector/ + $ composer.phar install --dev + $ phpunit diff --git a/src/Symfony/Component/CssSelector/Tests/bootstrap.php b/src/Symfony/Component/CssSelector/Tests/bootstrap.php deleted file mode 100644 index d2c7d087ef..0000000000 --- a/src/Symfony/Component/CssSelector/Tests/bootstrap.php +++ /dev/null @@ -1,18 +0,0 @@ - - * - * 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\CssSelector')) { - if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\CssSelector')).'.php')) { - require_once $file; - } - } -}); diff --git a/src/Symfony/Component/CssSelector/phpunit.xml.dist b/src/Symfony/Component/CssSelector/phpunit.xml.dist index 1aeb811580..a19dc00b34 100644 --- a/src/Symfony/Component/CssSelector/phpunit.xml.dist +++ b/src/Symfony/Component/CssSelector/phpunit.xml.dist @@ -9,7 +9,7 @@ processIsolation="false" stopOnFailure="false" syntaxCheck="false" - bootstrap="Tests/bootstrap.php" + bootstrap="vendor/autoload.php" > diff --git a/src/Symfony/Component/DependencyInjection/.gitignore b/src/Symfony/Component/DependencyInjection/.gitignore index d1502b087b..44de97a36a 100644 --- a/src/Symfony/Component/DependencyInjection/.gitignore +++ b/src/Symfony/Component/DependencyInjection/.gitignore @@ -1,2 +1,4 @@ vendor/ composer.lock +phpunit.xml + diff --git a/src/Symfony/Component/DependencyInjection/README.md b/src/Symfony/Component/DependencyInjection/README.md index 5cb62cf1c4..ab67595240 100644 --- a/src/Symfony/Component/DependencyInjection/README.md +++ b/src/Symfony/Component/DependencyInjection/README.md @@ -68,9 +68,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/DependencyInjection/ + $ composer.phar install --dev + $ phpunit diff --git a/src/Symfony/Component/DependencyInjection/Tests/bootstrap.php b/src/Symfony/Component/DependencyInjection/Tests/bootstrap.php deleted file mode 100644 index fd3118fc36..0000000000 --- a/src/Symfony/Component/DependencyInjection/Tests/bootstrap.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * 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\DependencyInjection')) { - if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\DependencyInjection')).'.php')) { - require_once $file; - } - } -}); - -if (file_exists($loader = __DIR__.'/../vendor/autoload.php')) { - require_once $loader; -} diff --git a/src/Symfony/Component/DependencyInjection/phpunit.xml.dist b/src/Symfony/Component/DependencyInjection/phpunit.xml.dist index 554d1046b5..53f5f99d60 100644 --- a/src/Symfony/Component/DependencyInjection/phpunit.xml.dist +++ b/src/Symfony/Component/DependencyInjection/phpunit.xml.dist @@ -9,7 +9,7 @@ processIsolation="false" stopOnFailure="false" syntaxCheck="false" - bootstrap="Tests/bootstrap.php" + bootstrap="vendor/autoload.php" > diff --git a/src/Symfony/Component/DomCrawler/.gitignore b/src/Symfony/Component/DomCrawler/.gitignore index d1502b087b..44de97a36a 100644 --- a/src/Symfony/Component/DomCrawler/.gitignore +++ b/src/Symfony/Component/DomCrawler/.gitignore @@ -1,2 +1,4 @@ vendor/ composer.lock +phpunit.xml + diff --git a/src/Symfony/Component/DomCrawler/README.md b/src/Symfony/Component/DomCrawler/README.md index b383b5184b..721c0d9df1 100644 --- a/src/Symfony/Component/DomCrawler/README.md +++ b/src/Symfony/Component/DomCrawler/README.md @@ -27,9 +27,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/DomCrawler/ + $ composer.phar install --dev + $ phpunit diff --git a/src/Symfony/Component/DomCrawler/Tests/bootstrap.php b/src/Symfony/Component/DomCrawler/Tests/bootstrap.php deleted file mode 100644 index 78425f484a..0000000000 --- a/src/Symfony/Component/DomCrawler/Tests/bootstrap.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * 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\DomCrawler')) { - if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\DomCrawler')).'.php')) { - require_once $file; - } - } -}); - -if (file_exists($loader = __DIR__.'/../vendor/autoload.php')) { - require_once $loader; -} diff --git a/src/Symfony/Component/DomCrawler/phpunit.xml.dist b/src/Symfony/Component/DomCrawler/phpunit.xml.dist index 1ee868ab54..0f8d2da757 100644 --- a/src/Symfony/Component/DomCrawler/phpunit.xml.dist +++ b/src/Symfony/Component/DomCrawler/phpunit.xml.dist @@ -9,7 +9,7 @@ processIsolation="false" stopOnFailure="false" syntaxCheck="false" - bootstrap="Tests/bootstrap.php" + bootstrap="vendor/autoload.php" > diff --git a/src/Symfony/Component/EventDispatcher/.gitignore b/src/Symfony/Component/EventDispatcher/.gitignore index d1502b087b..44de97a36a 100644 --- a/src/Symfony/Component/EventDispatcher/.gitignore +++ b/src/Symfony/Component/EventDispatcher/.gitignore @@ -1,2 +1,4 @@ vendor/ composer.lock +phpunit.xml + diff --git a/src/Symfony/Component/EventDispatcher/README.md b/src/Symfony/Component/EventDispatcher/README.md index a2bcfca1e3..11f6b1888e 100644 --- a/src/Symfony/Component/EventDispatcher/README.md +++ b/src/Symfony/Component/EventDispatcher/README.md @@ -20,9 +20,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/EventDispatcher/ + $ composer.phar install --dev + $ phpunit diff --git a/src/Symfony/Component/EventDispatcher/Tests/bootstrap.php b/src/Symfony/Component/EventDispatcher/Tests/bootstrap.php deleted file mode 100644 index 033180fd3f..0000000000 --- a/src/Symfony/Component/EventDispatcher/Tests/bootstrap.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * 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\EventDispatcher')) { - if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\EventDispatcher')).'.php')) { - require_once $file; - } - } -}); - -if (file_exists($loader = __DIR__.'/../vendor/autoload.php')) { - require_once $loader; -} diff --git a/src/Symfony/Component/EventDispatcher/phpunit.xml.dist b/src/Symfony/Component/EventDispatcher/phpunit.xml.dist index c5571353a6..0c3de4f7b2 100644 --- a/src/Symfony/Component/EventDispatcher/phpunit.xml.dist +++ b/src/Symfony/Component/EventDispatcher/phpunit.xml.dist @@ -9,7 +9,7 @@ processIsolation="false" stopOnFailure="false" syntaxCheck="false" - bootstrap="Tests/bootstrap.php" + bootstrap="vendor/autoload.php" > diff --git a/src/Symfony/Component/Filesystem/.gitignore b/src/Symfony/Component/Filesystem/.gitignore new file mode 100644 index 0000000000..44de97a36a --- /dev/null +++ b/src/Symfony/Component/Filesystem/.gitignore @@ -0,0 +1,4 @@ +vendor/ +composer.lock +phpunit.xml + diff --git a/src/Symfony/Component/Filesystem/README.md b/src/Symfony/Component/Filesystem/README.md index 5c654aad35..94ac1469c1 100644 --- a/src/Symfony/Component/Filesystem/README.md +++ b/src/Symfony/Component/Filesystem/README.md @@ -40,4 +40,6 @@ Resources You can run the unit tests with the following command: - phpunit + $ cd path/to/Symfony/Component/Filesystem/ + $ composer.phar install --dev + $ phpunit diff --git a/src/Symfony/Component/Filesystem/Tests/bootstrap.php b/src/Symfony/Component/Filesystem/Tests/bootstrap.php deleted file mode 100644 index 940c698450..0000000000 --- a/src/Symfony/Component/Filesystem/Tests/bootstrap.php +++ /dev/null @@ -1,18 +0,0 @@ - - * - * 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\Filesystem')) { - if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\Filesystem')).'.php')) { - require_once $file; - } - } -}); diff --git a/src/Symfony/Component/Filesystem/phpunit.xml.dist b/src/Symfony/Component/Filesystem/phpunit.xml.dist index 5cd2dc961c..ef0bf95413 100644 --- a/src/Symfony/Component/Filesystem/phpunit.xml.dist +++ b/src/Symfony/Component/Filesystem/phpunit.xml.dist @@ -9,7 +9,7 @@ processIsolation="false" stopOnFailure="false" syntaxCheck="false" - bootstrap="Tests/bootstrap.php" + bootstrap="vendor/autoload.php" > diff --git a/src/Symfony/Component/Finder/.gitignore b/src/Symfony/Component/Finder/.gitignore new file mode 100644 index 0000000000..44de97a36a --- /dev/null +++ b/src/Symfony/Component/Finder/.gitignore @@ -0,0 +1,4 @@ +vendor/ +composer.lock +phpunit.xml + diff --git a/src/Symfony/Component/Finder/README.md b/src/Symfony/Component/Finder/README.md index 0c4516f7d6..a4caf93baa 100644 --- a/src/Symfony/Component/Finder/README.md +++ b/src/Symfony/Component/Finder/README.md @@ -35,4 +35,7 @@ Resources You can run the unit tests with the following command: - phpunit + $ cd path/to/Symfony/Component/Finder/ + $ composer.phar install --dev + $ phpunit + diff --git a/src/Symfony/Component/Finder/Tests/FinderTest.php b/src/Symfony/Component/Finder/Tests/FinderTest.php index cf1109ebda..9b8384b5cc 100644 --- a/src/Symfony/Component/Finder/Tests/FinderTest.php +++ b/src/Symfony/Component/Finder/Tests/FinderTest.php @@ -312,7 +312,7 @@ class FinderTest extends Iterator\RealIteratorTestCase $finder = $this->buildFinder($adapter); $iterator = $finder->files()->name('*.php')->depth('< 1')->in(array(self::$tmpDir, __DIR__))->getIterator(); - $this->assertIterator(array(self::$tmpDir.DIRECTORY_SEPARATOR.'test.php', __DIR__.DIRECTORY_SEPARATOR.'FinderTest.php', __DIR__.DIRECTORY_SEPARATOR.'bootstrap.php'), $iterator); + $this->assertIterator(array(self::$tmpDir.DIRECTORY_SEPARATOR.'test.php', __DIR__.DIRECTORY_SEPARATOR.'FinderTest.php'), $iterator); } /** diff --git a/src/Symfony/Component/Finder/Tests/bootstrap.php b/src/Symfony/Component/Finder/Tests/bootstrap.php deleted file mode 100644 index 3edc1b2536..0000000000 --- a/src/Symfony/Component/Finder/Tests/bootstrap.php +++ /dev/null @@ -1,18 +0,0 @@ - - * - * 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\Finder')) { - if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\Finder')).'.php')) { - require_once $file; - } - } -}); diff --git a/src/Symfony/Component/Finder/phpunit.xml.dist b/src/Symfony/Component/Finder/phpunit.xml.dist index cd116f5716..23272235b9 100644 --- a/src/Symfony/Component/Finder/phpunit.xml.dist +++ b/src/Symfony/Component/Finder/phpunit.xml.dist @@ -9,7 +9,7 @@ processIsolation="false" stopOnFailure="false" syntaxCheck="false" - bootstrap="Tests/bootstrap.php" + bootstrap="vendor/autoload.php" > diff --git a/src/Symfony/Component/Form/.gitignore b/src/Symfony/Component/Form/.gitignore index d1502b087b..44de97a36a 100644 --- a/src/Symfony/Component/Form/.gitignore +++ b/src/Symfony/Component/Form/.gitignore @@ -1,2 +1,4 @@ vendor/ composer.lock +phpunit.xml + diff --git a/src/Symfony/Component/Form/README.md b/src/Symfony/Component/Form/README.md index f6ddf031aa..c336935dd8 100644 --- a/src/Symfony/Component/Form/README.md +++ b/src/Symfony/Component/Form/README.md @@ -21,9 +21,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/Form/ + $ composer.phar install --dev + $ phpunit diff --git a/src/Symfony/Component/Form/Tests/bootstrap.php b/src/Symfony/Component/Form/Tests/bootstrap.php deleted file mode 100644 index 902cefce5c..0000000000 --- a/src/Symfony/Component/Form/Tests/bootstrap.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * 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\Form')) { - if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\Form')).'.php')) { - require_once $file; - } - } -}); - -if (file_exists($loader = __DIR__.'/../vendor/autoload.php')) { - require_once $loader; -} diff --git a/src/Symfony/Component/Form/phpunit.xml.dist b/src/Symfony/Component/Form/phpunit.xml.dist index 0fd49c27e4..d0d261f194 100644 --- a/src/Symfony/Component/Form/phpunit.xml.dist +++ b/src/Symfony/Component/Form/phpunit.xml.dist @@ -9,7 +9,7 @@ processIsolation="false" stopOnFailure="false" syntaxCheck="false" - bootstrap="Tests/bootstrap.php" + bootstrap="vendor/autoload.php" > diff --git a/src/Symfony/Component/HttpFoundation/.gitignore b/src/Symfony/Component/HttpFoundation/.gitignore new file mode 100644 index 0000000000..44de97a36a --- /dev/null +++ b/src/Symfony/Component/HttpFoundation/.gitignore @@ -0,0 +1,4 @@ +vendor/ +composer.lock +phpunit.xml + diff --git a/src/Symfony/Component/HttpFoundation/README.md b/src/Symfony/Component/HttpFoundation/README.md index 0c4a4a9dc3..ed49b4e15e 100644 --- a/src/Symfony/Component/HttpFoundation/README.md +++ b/src/Symfony/Component/HttpFoundation/README.md @@ -43,4 +43,6 @@ Resources You can run the unit tests with the following command: - phpunit + $ cd path/to/Symfony/Component/HttpFoundation/ + $ composer.phar install --dev + $ phpunit diff --git a/src/Symfony/Component/HttpFoundation/Tests/BinaryFileResponseTest.php b/src/Symfony/Component/HttpFoundation/Tests/BinaryFileResponseTest.php index 4a8fe5489f..23f93f7a76 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/BinaryFileResponseTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/BinaryFileResponseTest.php @@ -49,7 +49,7 @@ class BinaryFileResponseTest extends \PHPUnit_Framework_TestCase public function testRequests() { - $response = BinaryFileResponse::create('src/Symfony/Component/HttpFoundation/Tests/File/Fixtures/test.gif')->setAutoEtag(); + $response = BinaryFileResponse::create(__DIR__.'/File/Fixtures/test.gif')->setAutoEtag(); // do a request to get the ETag $request = Request::create('/'); diff --git a/src/Symfony/Component/HttpFoundation/Tests/bootstrap.php b/src/Symfony/Component/HttpFoundation/Tests/bootstrap.php deleted file mode 100644 index f7fc8c9809..0000000000 --- a/src/Symfony/Component/HttpFoundation/Tests/bootstrap.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * 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 (ltrim('SessionHandlerInterface', '/') === $class) { - require_once __DIR__.'/../Resources/stubs/SessionHandlerInterface.php'; - } - - if (0 !== strpos(ltrim($class, '/'), 'Symfony\Component\HttpFoundation')) { - return; - } - - require_once __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\HttpFoundation')).'.php'; -}); diff --git a/src/Symfony/Component/HttpFoundation/composer.json b/src/Symfony/Component/HttpFoundation/composer.json index 09b8725308..a8e00ef287 100644 --- a/src/Symfony/Component/HttpFoundation/composer.json +++ b/src/Symfony/Component/HttpFoundation/composer.json @@ -20,7 +20,7 @@ }, "autoload": { "psr-0": { "Symfony\\Component\\HttpFoundation\\": "" }, - "classmap": [ "Symfony/Component/HttpFoundation/Resources/stubs" ] + "classmap": [ "Symfony/Component/HttpFoundation/Resources/Resources/stubs" ] }, "target-dir": "Symfony/Component/HttpFoundation", "minimum-stability": "dev", diff --git a/src/Symfony/Component/HttpFoundation/phpunit.xml.dist b/src/Symfony/Component/HttpFoundation/phpunit.xml.dist index 2a760f290c..df11f72c0f 100644 --- a/src/Symfony/Component/HttpFoundation/phpunit.xml.dist +++ b/src/Symfony/Component/HttpFoundation/phpunit.xml.dist @@ -9,7 +9,7 @@ processIsolation="false" stopOnFailure="false" syntaxCheck="false" - bootstrap="Tests/bootstrap.php" + bootstrap="vendor/autoload.php" > diff --git a/src/Symfony/Component/HttpKernel/.gitignore b/src/Symfony/Component/HttpKernel/.gitignore index d1502b087b..44de97a36a 100644 --- a/src/Symfony/Component/HttpKernel/.gitignore +++ b/src/Symfony/Component/HttpKernel/.gitignore @@ -1,2 +1,4 @@ vendor/ composer.lock +phpunit.xml + diff --git a/src/Symfony/Component/HttpKernel/README.md b/src/Symfony/Component/HttpKernel/README.md index c44d530858..e0f3c987c4 100644 --- a/src/Symfony/Component/HttpKernel/README.md +++ b/src/Symfony/Component/HttpKernel/README.md @@ -84,9 +84,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/HttpKernel/ + $ composer.phar install --dev + $ phpunit diff --git a/src/Symfony/Component/HttpKernel/Tests/Fixtures/TestClient.php b/src/Symfony/Component/HttpKernel/Tests/Fixtures/TestClient.php index 48ff956b4d..0d26fe42b3 100644 --- a/src/Symfony/Component/HttpKernel/Tests/Fixtures/TestClient.php +++ b/src/Symfony/Component/HttpKernel/Tests/Fixtures/TestClient.php @@ -19,7 +19,7 @@ class TestClient extends Client { $script = parent::getScript($request); - $script = preg_replace('/(\->register\(\);)/', "$0\nrequire_once '".__DIR__."/../bootstrap.php';", $script); + $script = preg_replace('/(\->register\(\);)/', "$0\nrequire_once '".__DIR__."/../../vendor/autoload.php';", $script); return $script; } diff --git a/src/Symfony/Component/HttpKernel/Tests/bootstrap.php b/src/Symfony/Component/HttpKernel/Tests/bootstrap.php deleted file mode 100644 index 24b1009e9a..0000000000 --- a/src/Symfony/Component/HttpKernel/Tests/bootstrap.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * 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\HttpKernel')) { - if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\HttpKernel')).'.php')) { - require_once $file; - } - } -}); - -if (file_exists($loader = __DIR__.'/../vendor/autoload.php')) { - require_once $loader; -} diff --git a/src/Symfony/Component/HttpKernel/phpunit.xml.dist b/src/Symfony/Component/HttpKernel/phpunit.xml.dist index dd824acdf7..f8490c3f9e 100644 --- a/src/Symfony/Component/HttpKernel/phpunit.xml.dist +++ b/src/Symfony/Component/HttpKernel/phpunit.xml.dist @@ -9,7 +9,7 @@ processIsolation="false" stopOnFailure="false" syntaxCheck="false" - bootstrap="Tests/bootstrap.php" + bootstrap="vendor/autoload.php" > diff --git a/src/Symfony/Component/Locale/.gitignore b/src/Symfony/Component/Locale/.gitignore index 3dc210d907..dc89eba81b 100644 --- a/src/Symfony/Component/Locale/.gitignore +++ b/src/Symfony/Component/Locale/.gitignore @@ -3,3 +3,6 @@ Resources/data/4.2/ Resources/data/4.4/ Resources/data/4.6/ Resources/data/4.8/ +vendor/ +composer.lock +phpunit.xml diff --git a/src/Symfony/Component/Locale/README.md b/src/Symfony/Component/Locale/README.md index 431a65a1fb..72b4bfa3d4 100644 --- a/src/Symfony/Component/Locale/README.md +++ b/src/Symfony/Component/Locale/README.md @@ -22,7 +22,9 @@ Resources You can run the unit tests with the following command: - phpunit + $ cd path/to/Symfony/Component/XXX/ + $ composer.phar install --dev + $ phpunit If your PHP have the ``intl`` extension enabled but the intl extension ICU data version mismatch the one shipped with the component, you can build the data for diff --git a/src/Symfony/Component/Locale/phpunit.xml.dist b/src/Symfony/Component/Locale/phpunit.xml.dist index f6a1a6f65d..ebaa3ef8d0 100644 --- a/src/Symfony/Component/Locale/phpunit.xml.dist +++ b/src/Symfony/Component/Locale/phpunit.xml.dist @@ -9,7 +9,7 @@ processIsolation="false" stopOnFailure="false" syntaxCheck="false" - bootstrap="Tests/bootstrap.php" + bootstrap="vendor/autoload.php" > diff --git a/src/Symfony/Component/OptionsResolver/.gitignore b/src/Symfony/Component/OptionsResolver/.gitignore new file mode 100644 index 0000000000..44de97a36a --- /dev/null +++ b/src/Symfony/Component/OptionsResolver/.gitignore @@ -0,0 +1,4 @@ +vendor/ +composer.lock +phpunit.xml + diff --git a/src/Symfony/Component/OptionsResolver/README.md b/src/Symfony/Component/OptionsResolver/README.md index e45b8b3d7d..29cea102d6 100644 --- a/src/Symfony/Component/OptionsResolver/README.md +++ b/src/Symfony/Component/OptionsResolver/README.md @@ -102,4 +102,6 @@ Resources You can run the unit tests with the following command: - phpunit + $ cd path/to/Symfony/Component/OptionsResolver/ + $ composer.phar install --dev + $ phpunit diff --git a/src/Symfony/Component/OptionsResolver/Tests/bootstrap.php b/src/Symfony/Component/OptionsResolver/Tests/bootstrap.php deleted file mode 100644 index 328ecb2d1e..0000000000 --- a/src/Symfony/Component/OptionsResolver/Tests/bootstrap.php +++ /dev/null @@ -1,18 +0,0 @@ - - * - * 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\OptionsResolver')) { - if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\OptionsResolver')).'.php')) { - require_once $file; - } - } -}); diff --git a/src/Symfony/Component/OptionsResolver/phpunit.xml.dist b/src/Symfony/Component/OptionsResolver/phpunit.xml.dist index 639bb3fbc6..ad24d17ba8 100644 --- a/src/Symfony/Component/OptionsResolver/phpunit.xml.dist +++ b/src/Symfony/Component/OptionsResolver/phpunit.xml.dist @@ -9,7 +9,7 @@ processIsolation="false" stopOnFailure="false" syntaxCheck="false" - bootstrap="Tests/bootstrap.php" + bootstrap="vendor/autoload.php" > diff --git a/src/Symfony/Component/Process/.gitignore b/src/Symfony/Component/Process/.gitignore new file mode 100644 index 0000000000..44de97a36a --- /dev/null +++ b/src/Symfony/Component/Process/.gitignore @@ -0,0 +1,4 @@ +vendor/ +composer.lock +phpunit.xml + diff --git a/src/Symfony/Component/Process/README.md b/src/Symfony/Component/Process/README.md index 2a8a4f764a..7b9f30757b 100644 --- a/src/Symfony/Component/Process/README.md +++ b/src/Symfony/Component/Process/README.md @@ -42,4 +42,6 @@ Resources You can run the unit tests with the following command: - phpunit + $ cd path/to/Symfony/Component/XXX/ + $ composer.phar install --dev + $ phpunit diff --git a/src/Symfony/Component/Process/Tests/bootstrap.php b/src/Symfony/Component/Process/Tests/bootstrap.php deleted file mode 100644 index 11054b9892..0000000000 --- a/src/Symfony/Component/Process/Tests/bootstrap.php +++ /dev/null @@ -1,18 +0,0 @@ - - * - * 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\Process')) { - if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\Process')).'.php')) { - require_once $file; - } - } -}); diff --git a/src/Symfony/Component/Process/phpunit.xml.dist b/src/Symfony/Component/Process/phpunit.xml.dist index c120a97e91..9d5830f9e2 100644 --- a/src/Symfony/Component/Process/phpunit.xml.dist +++ b/src/Symfony/Component/Process/phpunit.xml.dist @@ -9,7 +9,7 @@ processIsolation="false" stopOnFailure="false" syntaxCheck="false" - bootstrap="Tests/bootstrap.php" + bootstrap="vendor/autoload.php" > diff --git a/src/Symfony/Component/Routing/.gitignore b/src/Symfony/Component/Routing/.gitignore index d1502b087b..44de97a36a 100644 --- a/src/Symfony/Component/Routing/.gitignore +++ b/src/Symfony/Component/Routing/.gitignore @@ -1,2 +1,4 @@ vendor/ composer.lock +phpunit.xml + diff --git a/src/Symfony/Component/Routing/README.md b/src/Symfony/Component/Routing/README.md index 61504c84d9..663844a674 100644 --- a/src/Symfony/Component/Routing/README.md +++ b/src/Symfony/Component/Routing/README.md @@ -29,9 +29,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/Routing/ + $ composer.phar install --dev + $ phpunit diff --git a/src/Symfony/Component/Routing/Tests/bootstrap.php b/src/Symfony/Component/Routing/Tests/bootstrap.php deleted file mode 100644 index 23303c04bb..0000000000 --- a/src/Symfony/Component/Routing/Tests/bootstrap.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * 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\Routing')) { - if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\Routing')).'.php')) { - require_once $file; - } - } -}); - -if (file_exists($loader = __DIR__.'/../vendor/autoload.php')) { - require_once $loader; -} diff --git a/src/Symfony/Component/Routing/phpunit.xml.dist b/src/Symfony/Component/Routing/phpunit.xml.dist index 6d25ebf91f..830066aab5 100644 --- a/src/Symfony/Component/Routing/phpunit.xml.dist +++ b/src/Symfony/Component/Routing/phpunit.xml.dist @@ -9,7 +9,7 @@ processIsolation="false" stopOnFailure="false" syntaxCheck="false" - bootstrap="Tests/bootstrap.php" + bootstrap="vendor/autoload.php" > diff --git a/src/Symfony/Component/Security/.gitignore b/src/Symfony/Component/Security/.gitignore index d1502b087b..44de97a36a 100644 --- a/src/Symfony/Component/Security/.gitignore +++ b/src/Symfony/Component/Security/.gitignore @@ -1,2 +1,4 @@ vendor/ composer.lock +phpunit.xml + diff --git a/src/Symfony/Component/Security/README.md b/src/Symfony/Component/Security/README.md index 7ae97b1030..057f8445be 100644 --- a/src/Symfony/Component/Security/README.md +++ b/src/Symfony/Component/Security/README.md @@ -18,9 +18,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/Security/ + $ composer.phar install --dev + $ phpunit diff --git a/src/Symfony/Component/Security/Tests/bootstrap.php b/src/Symfony/Component/Security/Tests/bootstrap.php deleted file mode 100644 index 84ae3a6788..0000000000 --- a/src/Symfony/Component/Security/Tests/bootstrap.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * 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\Security')) { - if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\Security')).'.php')) { - require_once $file; - } - } -}); - -if (file_exists($loader = __DIR__.'/../vendor/autoload.php')) { - require_once $loader; -} diff --git a/src/Symfony/Component/Security/phpunit.xml.dist b/src/Symfony/Component/Security/phpunit.xml.dist index 0560cf5334..f45a44ec5a 100644 --- a/src/Symfony/Component/Security/phpunit.xml.dist +++ b/src/Symfony/Component/Security/phpunit.xml.dist @@ -9,7 +9,7 @@ processIsolation="false" stopOnFailure="false" syntaxCheck="false" - bootstrap="Tests/bootstrap.php" + bootstrap="vendor/autoload.php" > diff --git a/src/Symfony/Component/Serializer/.gitignore b/src/Symfony/Component/Serializer/.gitignore new file mode 100644 index 0000000000..44de97a36a --- /dev/null +++ b/src/Symfony/Component/Serializer/.gitignore @@ -0,0 +1,4 @@ +vendor/ +composer.lock +phpunit.xml + diff --git a/src/Symfony/Component/Serializer/README.md b/src/Symfony/Component/Serializer/README.md index df74a9a001..3e808059db 100644 --- a/src/Symfony/Component/Serializer/README.md +++ b/src/Symfony/Component/Serializer/README.md @@ -10,4 +10,6 @@ Resources You can run the unit tests with the following command: - phpunit + $ cd path/to/Symfony/Component/Serializer/ + $ composer.phar install --dev + $ phpunit diff --git a/src/Symfony/Component/Serializer/Tests/bootstrap.php b/src/Symfony/Component/Serializer/Tests/bootstrap.php deleted file mode 100644 index 3b0e811a94..0000000000 --- a/src/Symfony/Component/Serializer/Tests/bootstrap.php +++ /dev/null @@ -1,18 +0,0 @@ - - * - * 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\Serializer')) { - if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\Serializer')).'.php')) { - require_once $file; - } - } -}); diff --git a/src/Symfony/Component/Serializer/phpunit.xml.dist b/src/Symfony/Component/Serializer/phpunit.xml.dist index c85ffa717a..691219da83 100644 --- a/src/Symfony/Component/Serializer/phpunit.xml.dist +++ b/src/Symfony/Component/Serializer/phpunit.xml.dist @@ -9,7 +9,7 @@ processIsolation="false" stopOnFailure="false" syntaxCheck="false" - bootstrap="Tests/bootstrap.php" + bootstrap="vendor/autoload.php" > diff --git a/src/Symfony/Component/Templating/.gitignore b/src/Symfony/Component/Templating/.gitignore new file mode 100644 index 0000000000..44de97a36a --- /dev/null +++ b/src/Symfony/Component/Templating/.gitignore @@ -0,0 +1,4 @@ +vendor/ +composer.lock +phpunit.xml + diff --git a/src/Symfony/Component/Templating/README.md b/src/Symfony/Component/Templating/README.md index 55d9c69e3d..7c2814a2d3 100644 --- a/src/Symfony/Component/Templating/README.md +++ b/src/Symfony/Component/Templating/README.md @@ -13,4 +13,6 @@ Resources You can run the unit tests with the following command: - phpunit + $ cd path/to/Symfony/Component/Templating/ + $ composer.phar install --dev + $ phpunit diff --git a/src/Symfony/Component/Templating/Tests/bootstrap.php b/src/Symfony/Component/Templating/Tests/bootstrap.php deleted file mode 100644 index 78a2ec541b..0000000000 --- a/src/Symfony/Component/Templating/Tests/bootstrap.php +++ /dev/null @@ -1,18 +0,0 @@ - - * - * 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\Templating')) { - if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\Templating')).'.php')) { - require_once $file; - } - } -}); diff --git a/src/Symfony/Component/Templating/phpunit.xml.dist b/src/Symfony/Component/Templating/phpunit.xml.dist index 0fc73521c5..89288dd30e 100644 --- a/src/Symfony/Component/Templating/phpunit.xml.dist +++ b/src/Symfony/Component/Templating/phpunit.xml.dist @@ -9,7 +9,7 @@ processIsolation="false" stopOnFailure="false" syntaxCheck="false" - bootstrap="Tests/bootstrap.php" + bootstrap="vendor/autoload.php" > diff --git a/src/Symfony/Component/Translation/.gitignore b/src/Symfony/Component/Translation/.gitignore index d1502b087b..44de97a36a 100644 --- a/src/Symfony/Component/Translation/.gitignore +++ b/src/Symfony/Component/Translation/.gitignore @@ -1,2 +1,4 @@ vendor/ composer.lock +phpunit.xml + diff --git a/src/Symfony/Component/Translation/README.md b/src/Symfony/Component/Translation/README.md index c5dd05222e..4aab5f714e 100644 --- a/src/Symfony/Component/Translation/README.md +++ b/src/Symfony/Component/Translation/README.md @@ -30,9 +30,6 @@ http://symfony.com/doc/2.0/book/translation.html 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/Translation/ + $ composer.phar install --dev + $ phpunit diff --git a/src/Symfony/Component/Translation/Tests/bootstrap.php b/src/Symfony/Component/Translation/Tests/bootstrap.php deleted file mode 100644 index c203e99979..0000000000 --- a/src/Symfony/Component/Translation/Tests/bootstrap.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * 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\Translation')) { - if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\Translation')).'.php')) { - require_once $file; - } - } -}); - -if (file_exists($loader = __DIR__.'/../vendor/autoload.php')) { - require_once $loader; -} diff --git a/src/Symfony/Component/Translation/phpunit.xml.dist b/src/Symfony/Component/Translation/phpunit.xml.dist index 65542f6a89..1b37f2142a 100644 --- a/src/Symfony/Component/Translation/phpunit.xml.dist +++ b/src/Symfony/Component/Translation/phpunit.xml.dist @@ -9,7 +9,7 @@ processIsolation="false" stopOnFailure="false" syntaxCheck="false" - bootstrap="Tests/bootstrap.php" + bootstrap="vendor/autoload.php" > diff --git a/src/Symfony/Component/Validator/.gitignore b/src/Symfony/Component/Validator/.gitignore index d1502b087b..44de97a36a 100644 --- a/src/Symfony/Component/Validator/.gitignore +++ b/src/Symfony/Component/Validator/.gitignore @@ -1,2 +1,4 @@ vendor/ composer.lock +phpunit.xml + diff --git a/src/Symfony/Component/Validator/README.md b/src/Symfony/Component/Validator/README.md index 620c3aa4e9..f1b255602a 100644 --- a/src/Symfony/Component/Validator/README.md +++ b/src/Symfony/Component/Validator/README.md @@ -115,9 +115,6 @@ http://jcp.org/en/jsr/detail?id=303 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/Validator/ + $ composer.phar install --dev + $ phpunit diff --git a/src/Symfony/Component/Validator/Tests/bootstrap.php b/src/Symfony/Component/Validator/Tests/bootstrap.php deleted file mode 100644 index be500e8642..0000000000 --- a/src/Symfony/Component/Validator/Tests/bootstrap.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * 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\Validator')) { - if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\Validator')).'.php')) { - require_once $file; - } - } -}); - -if (file_exists($loader = __DIR__.'/../vendor/autoload.php')) { - require_once $loader; -} - -if (class_exists($annotationRegistry = 'Doctrine\Common\Annotations\AnnotationRegistry')) { - $annotationRegistry::registerLoader(function($class) { - if (0 === strpos(ltrim($class, '/'), 'Symfony\Component\Validator')) { - if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\Validator')).'.php')) { - require_once $file; - } - } - - return class_exists($class, false); - }); -} diff --git a/src/Symfony/Component/Validator/phpunit.xml.dist b/src/Symfony/Component/Validator/phpunit.xml.dist index a29586c86b..c7f1cef070 100644 --- a/src/Symfony/Component/Validator/phpunit.xml.dist +++ b/src/Symfony/Component/Validator/phpunit.xml.dist @@ -9,7 +9,7 @@ processIsolation="false" stopOnFailure="false" syntaxCheck="false" - bootstrap="Tests/bootstrap.php" + bootstrap="vendor/autoload.php" > diff --git a/src/Symfony/Component/Yaml/.gitignore b/src/Symfony/Component/Yaml/.gitignore new file mode 100644 index 0000000000..44de97a36a --- /dev/null +++ b/src/Symfony/Component/Yaml/.gitignore @@ -0,0 +1,4 @@ +vendor/ +composer.lock +phpunit.xml + diff --git a/src/Symfony/Component/Yaml/README.md b/src/Symfony/Component/Yaml/README.md index 3441316699..0864e49dca 100644 --- a/src/Symfony/Component/Yaml/README.md +++ b/src/Symfony/Component/Yaml/README.md @@ -14,4 +14,6 @@ Resources You can run the unit tests with the following command: - phpunit + $ cd path/to/Symfony/Component/Yaml/ + $ composer.phar install --dev + $ phpunit diff --git a/src/Symfony/Component/Yaml/Tests/bootstrap.php b/src/Symfony/Component/Yaml/Tests/bootstrap.php deleted file mode 100644 index 985f1f22e2..0000000000 --- a/src/Symfony/Component/Yaml/Tests/bootstrap.php +++ /dev/null @@ -1,18 +0,0 @@ - - * - * 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\Yaml')) { - if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\Yaml')).'.php')) { - require_once $file; - } - } -}); diff --git a/src/Symfony/Component/Yaml/phpunit.xml.dist b/src/Symfony/Component/Yaml/phpunit.xml.dist index d025f9e49a..aa77e9de77 100644 --- a/src/Symfony/Component/Yaml/phpunit.xml.dist +++ b/src/Symfony/Component/Yaml/phpunit.xml.dist @@ -9,7 +9,7 @@ processIsolation="false" stopOnFailure="false" syntaxCheck="false" - bootstrap="Tests/bootstrap.php" + bootstrap="vendor/autoload.php" >