public function testConstructorInit() { $m = new gtMethod('Phar', 'buildFromDirectory'); $m->setArgumentNames(); $m->setConstructorArgumentNames(); $m->setConstructorInitStatements(); $a = $m->getConstructorInitStatements(); $this->assertEquals('$filename = ', $a[0]); $this->assertEquals('$flags = ', $a[1]); $this->assertEquals('$alias = ', $a[2]); $this->assertEquals('$fileformat = ', $a[3]); }
public function testTestCase() { $f = new gtMethod('DOMDocument', 'createAttribute'); $f->setArgumentNames(); $f->setArgumentLists(); $f->setInitialisationStatements(); $f->setConstructorArgumentNames(); $f->setConstructorInitStatements(); $optSect = new gtOptionalSections(); $btc = gtBasicTestCaseMethod::getInstance($optSect, 'method'); $btc->setMethod($f); $btc->constructTestCase(); $fs = $btc->toString(); $this->assertTrue(is_string($fs)); }
public function testTestCase() { $f = new gtMethod('DOMDocument', 'createAttribute'); $f->setArgumentNames(); $f->setArgumentLists(); $f->setConstructorArgumentNames(); $f->setConstructorInitStatements(); $optSect = new gtOptionalSections(); $vtc = gtVariationTestCase::getInstance($optSect, 'method'); $vtc->setUp($f, 1, 'int'); $vtc->constructTestCase(); $fs = $vtc->toString(); $this->assertTrue(is_string($fs)); }
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(); $function->setArgumentLists(); $function->setInitialisationStatements(); } if ($options->hasOption('b')) {