Tester\Runner\CommandLine::help PHP Method

help() public method

public help ( )
    public function help()
    {
        echo $this->help;
    }

Usage Example

Example #1
0
    -h | --help            This help.

XX
, array('-c' => array(Cmd::REALPATH => TRUE), '--watch' => array(Cmd::REPEATABLE => TRUE, Cmd::REALPATH => TRUE), '--setup' => array(Cmd::REALPATH => TRUE), 'paths' => array(Cmd::REPEATABLE => TRUE, Cmd::VALUE => getcwd()), '--debug' => array(), '--coverage-src' => array(Cmd::REALPATH => TRUE)));
if (isset($_SERVER['argv']) && ($tmp = array_search('-log', $_SERVER['argv']))) {
    $_SERVER['argv'][$tmp] = '--log';
}
$options = $cmd->parse();
Tester\Environment::$debugMode = (bool) $options['--debug'];
if (isset($options['--colors'])) {
    Tester\Environment::$useColors = (bool) $options['--colors'];
} elseif ($options['--tap']) {
    Tester\Environment::$useColors = FALSE;
}
if ($cmd->isEmpty() || $options['--help']) {
    $cmd->help();
    exit;
}
$phpArgs = '';
if ($options['-c']) {
    $phpArgs .= ' -c ' . Tester\Helpers::escapeArg($options['-c']);
} elseif (!$options['--info']) {
    echo "Note: No php.ini is used.\n";
}
foreach ($options['-d'] as $item) {
    $phpArgs .= ' -d ' . Tester\Helpers::escapeArg($item);
}
$php = new Tester\Runner\PhpExecutable($options['-p'], $phpArgs);
if ($options['--info']) {
    $job = new Tester\Runner\Job(__DIR__ . '/Runner/info.php', $php);
    $job->run();