public function testMessage() { $clo = new gtCommandLineOptions(); $clo->parse(array('generate-phpt.php', '-c', 'blah')); $ch = new gtIsSpecifiedFunctionOrMethod(); $this->assertEquals($ch->getMessage(), gtText::get('functionOrMethodNotSpecified')); }
public function testMessage() { $clo = new gtCommandLineOptions(); $clo->parse(array('generate-phpt.php', '-c', 'blah')); $ch = new gtIsvalidMethod(); $this->assertEquals($ch->getMessage(), gtText::get('unknownMethod')); }
/** * Create an instance of each pre-condition and run their check methods * */ public function check($clo) { foreach ($this->preConditions as $preCon) { $checkThis = new $preCon(); if (!$checkThis->check($clo)) { echo $checkThis->getMessage(); die(gtText::get('help')); } } }
public function getMessage() { return gtText::get('unknownFunction'); }
die("Sorry, you need PHP version 5.3 or greater to run this.\n"); } } if ($major < 5) { die("Seriously, you need to upgrade you PHP level\n"); } $options = new gtCommandLineOptions(); $optionalSections = new gtOptionalSections(); try { $options->parse($argv); } 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();
public function getMessage() { return gtText::get('methodNotSpecified'); }
public function getMessage() { return gtText::get('testTypeNotSpecified'); }