require_once __DIR__."/../../autoload.php";
+use pharext\Cli\Args as CliArgs;
+use pharext\Cli\Command as CliCommand;
+
class Cmd implements Command
{
use CliCommand;
protected $source;
protected function setUp() {
- $this->source = new GitSourceDir(new Cmd, ".");
+ $this->source = new SourceDir\Git(new Cmd, ".");
}
public function testGetBaseDir() {
}
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);
}