public getCommand ( ) : string | ||
return | string |
public function getCommand()
{
$command = '';
foreach ($this->arguments as $arg) {
if (strpos($arg, '--') === false) {
$command = $arg;
break;
}
}
return $command;
}
public function testHelpCommand() { $argv = array('./dbpatch.php', 'help', 'update'); $console = new DbPatch_Core_Console($argv); $this->assertEquals('help', $console->getCommand()); $this->assertEquals(array('update' => 'update'), $console->getOptions()); }