public function testTestCase() { $f = new gtFunction('cos'); $f->setArgumentNames(); $f->setArgumentLists(); $f->setInitialisationStatements(); $optSect = new gtOptionalSections(); $btc = gtErrorTestCase::getInstance($optSect); $btc->setFunction($f); $btc->constructTestCase(); $fs = $btc->toString(); $this->assertTrue(is_string($fs)); }
public function testTestCase() { $f = new gtMethod('DOMDocument', 'createAttribute'); $f->setArgumentNames(); $f->setArgumentLists(); $f->setInitialisationStatements(); $f->setConstructorArgumentNames(); $f->setConstructorInitStatements(); $optSect = new gtOptionalSections(); $btc = gtErrorTestCase::getInstance($optSect, 'method'); $btc->setMethod($f); $btc->constructTestCase(); $fs = $btc->toString(); $this->assertTrue(is_string($fs)); }
if ($options->hasOption('c')) { $testCase = gtBasicTestCase::getInstance($optionalSections, 'method'); $testCase->setMethod($method); } else { $testCase = gtBasicTestCase::getInstance($optionalSections); $testCase->setFunction($function); } $testCase->constructTestCase(); gtTestCaseWriter::write($name, $testCase->toString(), 'b'); } if ($options->hasOption('e')) { if ($options->hasOption('c')) { $testCase = gtErrorTestCase::getInstance($optionalSections, 'method'); $testCase->setMethod($method); } else { $testCase = gtErrorTestCase::getInstance($optionalSections); $testCase->setFunction($function); } $testCase->constructTestCase(); gtTestCaseWriter::write($name, $testCase->toString(), 'e'); } if ($options->hasOption('v')) { if ($options->hasOption('c')) { $testCaseContainer = gtVariationContainer::getInstance($optionalSections, 'method'); $testCaseContainer->setMethod($method); } else { $testCaseContainer = gtVariationContainer::getInstance($optionalSections); $testCaseContainer->setFunction($function); } $testCaseContainer->constructAll(); $tests = $testCaseContainer->getVariationTests();