public function __construct($path, ConsoleIO $io) { if (!$path) { throw new \Exception('Path cannot be empty'); } $type = Type::determine($path, false === realpath($path)); $this->command = Factory::getCommand($type, $path, $io); }
public function test_determine_srcdir() { $this->string(Command\Type::determine(getcwd(), false))->isIdenticalTo(Command\Type::SRC_DIR)->string(Command\Type::determine(getcwd(), true))->isIdenticalTo(Command\Type::ANY); }