From 2bdc45a990e7f16107252539a0cf51b486b43f76 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Mon, 9 Mar 2015 09:09:40 +0100 Subject: [PATCH] fix tests --- tests/autoload.php | 1 + tests/src/pharext/CliArgsTest.php | 2 ++ tests/src/pharext/CliCommandTest.php | 5 +++++ tests/src/pharext/GitSourceDirTest.php | 7 +++++-- tests/src/pharext/Version.php | 1 + 5 files changed, 14 insertions(+), 2 deletions(-) create mode 120000 tests/src/pharext/Version.php diff --git a/tests/autoload.php b/tests/autoload.php index d914f3f..116defa 100644 --- a/tests/autoload.php +++ b/tests/autoload.php @@ -1,4 +1,5 @@ source = new GitSourceDir(new Cmd, "."); + $this->source = new SourceDir\Git(new Cmd, "."); } 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); } diff --git a/tests/src/pharext/Version.php b/tests/src/pharext/Version.php new file mode 120000 index 0000000..39773a5 --- /dev/null +++ b/tests/src/pharext/Version.php @@ -0,0 +1 @@ +../../../src/pharext/Version.php \ No newline at end of file -- 2.30.2