Skip to content

Commit

Permalink
made usage of Composer autoloader for subtree-split unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Nov 9, 2012
1 parent 5027186 commit 2610ebb
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 21 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,4 @@
vendor/
composer.lock
phpunit.xml

5 changes: 4 additions & 1 deletion README.md
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -35,4 +35,7 @@ Resources


You can run the unit tests with the following command: You can run the unit tests with the following command:


phpunit $ cd path/to/Symfony/Component/Finder/
$ composer.phar install --dev
$ phpunit

2 changes: 1 addition & 1 deletion Tests/FinderTest.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ public function testIn($adapter)
$finder = $this->buildFinder($adapter); $finder = $this->buildFinder($adapter);
$iterator = $finder->files()->name('*.php')->depth('< 1')->in(array(self::$tmpDir, __DIR__))->getIterator(); $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);
} }


/** /**
Expand Down
18 changes: 0 additions & 18 deletions Tests/bootstrap.php

This file was deleted.

2 changes: 1 addition & 1 deletion phpunit.xml.dist
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
processIsolation="false" processIsolation="false"
stopOnFailure="false" stopOnFailure="false"
syntaxCheck="false" syntaxCheck="false"
bootstrap="Tests/bootstrap.php" bootstrap="vendor/autoload.php"
> >
<testsuites> <testsuites>
<testsuite name="Symfony Finder Component Test Suite"> <testsuite name="Symfony Finder Component Test Suite">
Expand Down

0 comments on commit 2610ebb

Please sign in to comment.