Permalink
Browse files

made usage of Composer autoloader for subtree-split unit tests

  • Loading branch information...
1 parent 5027186 commit 2610ebbfaee33da84aec60fd641422cd186e67c1 @fabpot fabpot committed Nov 9, 2012
Showing with 10 additions and 21 deletions.
  1. +4 −0 .gitignore
  2. +4 −1 README.md
  3. +1 −1 Tests/FinderTest.php
  4. +0 −18 Tests/bootstrap.php
  5. +1 −1 phpunit.xml.dist
View
@@ -0,0 +1,4 @@
+vendor/
+composer.lock
+phpunit.xml
+
View
@@ -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
+
View
@@ -312,7 +312,7 @@ public function testIn($adapter)
$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);
}
/**
View
@@ -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\Finder')) {
- if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\Finder')).'.php')) {
- require_once $file;
- }
- }
-});
View
@@ -9,7 +9,7 @@
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false"
- bootstrap="Tests/bootstrap.php"
+ bootstrap="vendor/autoload.php"
>
<testsuites>
<testsuite name="Symfony Finder Component Test Suite">

0 comments on commit 2610ebb

Please sign in to comment.