public function testSkipKey()
 {
     $clo = new gtCommandLineOptions();
     $clo->parse(array('generate-phpt.php', '-s', 'skipif', '-k', 'win'));
     $opt = new gtOptionalSections();
     $opt->setOptions($clo);
     $opt = new gtOptionalSections();
     $opt->setOptions($clo);
     $this->assertEquals('win', $opt->getSkipifKey());
 }
Esempio n. 2
0
} catch (exception $e) {
    echo $e->getMessage() . "\n";
    die;
}
if ($options->hasOption('h')) {
    die(gtText::get('help'));
}
try {
    $preConditions = new gtPreConditionList();
    $preConditions->check($options);
} catch (exception $e) {
    echo $e->getMessage() . "\n";
    die;
}
if ($options->hasOption('s')) {
    $optionalSections->setOptions($options);
}
if ($options->hasOption('c')) {
    $name = $options->getOption('c') . "_" . $options->getOption('m');
    $method = new gtMethod($options->getOption('c'), $options->getOption('m'));
    $method->setArgumentNames();
    $method->setArgumentLists();
    $method->setInitialisationStatements();
    $method->setConstructorArgumentNames();
    $method->setConstructorInitStatements();
    $method->setConstructorArgumentList();
}
if ($options->hasOption('f')) {
    $name = $options->getOption('f');
    $function = new gtFunction($name);
    $function->setArgumentNames();