<?php
+set_include_path(__DIR__."/src:".get_include_path());
spl_autoload_register(function($class) {
if (strncmp($class, "pharext\\", strlen("pharext\\"))) {
return false;
namespace pharext;
+require __DIR__."/../../autoload.php";
+
+use pharext\Cli\Args as CliArgs;
+use pharext\Cli\Command as CliCommand;
+
class CliCommandTest extends \PHPUnit_Framework_TestCase
{
use CliCommand;
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);
}