public function testTestCase3() { $f = new gtFunction('date_sunrise'); $f->setArgumentNames(); $f->setArgumentLists(); $optSect = new gtOptionalSections(); $vtc = gtVariationTestCase::getInstance($optSect); $vtc->setUp($f, 6, 'array'); $vtc->constructTestCase(); $fs = $vtc->toString(); $this->assertTrue(is_string($fs)); }
/** * constructs all possible variation testcases in array $this->variationTests * */ public function constructAll() { $numberOfArguments = count($this->function->getMandatoryArgumentNames()) + count($this->function->getOptionalArgumentNames()); for ($i = 1; $i <= $numberOfArguments; $i++) { foreach ($this->dataTypes as $d) { $testCase = gtVariationTestCase::getInstance($this->optionalSections); $testCase->setUp($this->function, $i, $d); $testCase->constructTestCase(); $this->variationTests[] = $testCase->toString(); } } }
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)); }