Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

made usage of Composer autoloader for subtree-split unit tests

  • Loading branch information...
commit 2fc2bbdd841ee67dbeeb4bad3c5385fd2e521e6c 1 parent 8d08224
@fabpot fabpot authored
View
4 .gitignore
@@ -0,0 +1,4 @@
+vendor/
+composer.lock
+phpunit.xml
+
View
4 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
View
18 Tests/bootstrap.php
@@ -1,18 +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\CssSelector')) {
- if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\CssSelector')).'.php')) {
- require_once $file;
- }
- }
-});
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 CssSelector Component Test Suite">
Please sign in to comment.
Something went wrong with that request. Please try again.