X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=tests%2Fsrc%2Fpharext%2FGitSourceDirTest.php;h=ac04d4d9292df5c70327f31456399ad52ea0e2fc;hb=e990b6dabecbdaf98b8d8b2173b0d697f9b2b754;hp=36f2f1ff3b375dd34873ad70035caa171ea6f4e0;hpb=2b1a58c703d3589fe83e74e2e1f9448fdf1ad0b1;p=pharext%2Fpharext diff --git a/tests/src/pharext/GitSourceDirTest.php b/tests/src/pharext/GitSourceDirTest.php index 36f2f1f..ac04d4d 100644 --- a/tests/src/pharext/GitSourceDirTest.php +++ b/tests/src/pharext/GitSourceDirTest.php @@ -4,6 +4,9 @@ namespace pharext; require_once __DIR__."/../../autoload.php"; +use pharext\Cli\Args as CliArgs; +use pharext\Cli\Command as CliCommand; + class Cmd implements Command { use CliCommand; @@ -22,7 +25,7 @@ class GitSourceDirTest extends \PHPUnit_Framework_TestCase protected $source; protected function setUp() { - $this->source = new GitSourceDir(new Cmd, "."); + $this->source = new SourceDir\Git("."); } public function testGetBaseDir() { @@ -30,7 +33,7 @@ class GitSourceDirTest extends \PHPUnit_Framework_TestCase } public function testIterator() { - $git_files = `git ls-files | xargs -I{} -n1 echo \$(pwd)/{}`; + $git_files = `git ls-tree --name-only -r HEAD | xargs -I{} -n1 echo \$(pwd)/{}`; $dir_files = implode("\n", iterator_to_array($this->source->getIterator()))."\n"; $this->assertSame($git_files, $dir_files); }