Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

made usage of Composer autoloader for subtree-split unit tests

  • Loading branch information...
commit cba106ac4d0a9d9d7c543d4e71acd8e94cefab68 1 parent 61c1551
@fabpot fabpot authored
View
4 .gitignore
@@ -0,0 +1,4 @@
+vendor/
+composer.lock
+phpunit.xml
+
View
4 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
View
2  Tests/BinaryFileResponseTest.php
@@ -49,7 +49,7 @@ public function testGetContent()
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('/');
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 (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';
-});
View
2  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",
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 HttpFoundation Component Test Suite">
Please sign in to comment.
Something went wrong with that request. Please try again.