public function subjectCalls() { $lists = $this->subject->getValidArgumentLists(); foreach ($lists as $list) { $this->testCase[] = "var_dump( \$class->" . $this->subject->getName() . "( " . $list . " ) );"; $this->testCase = gtCodeSnippet::appendBlankLines(1, $this->testCase); } $this->testCase = gtCodeSnippet::appendBlankLines(2, $this->testCase); }
/** * Add the test section to call the function * */ public function subjectCalls() { // Construct the argument list to pass to the function being tested $lists = $this->subject->getValidArgumentLists(); foreach ($lists as $list) { $this->testCase = gtCodeSnippet::appendBlankLines(1, $this->testCase); $this->testCase[] = "var_dump(" . $this->subject->getName() . "( " . $list . " ) );"; } $this->testCase = gtCodeSnippet::appendBlankLines(2, $this->testCase); }
public function subjectCalls() { // Construct the argument list to pass to the method being tested $list = $this->subject->getExtraArgumentList(); $this->testCase = gtCodeSnippet::appendBlankLines(1, $this->testCase); $this->testCase[] = "var_dump(" . $this->subject->getName() . "( " . $list . " ) );"; $list = $this->subject->getShortArgumentList(); $this->testCase = gtCodeSnippet::appendBlankLines(1, $this->testCase); $this->testCase[] = "var_dump(" . $this->subject->getName() . "( " . $list . " ) );"; }
public function addErrorEcho() { $this->testCase[] = "echo \"*** Test by calling method or function with incorrect numbers of arguments ***\\n\";"; $this->testCase = gtCodeSnippet::appendBlankLines(1, $this->testCase); }
public function addBasicEcho() { $this->testCase[] = "echo \"*** Test by calling method or function with its expected arguments ***\\n\";"; $this->testCase = gtCodeSnippet::appendBlankLines(1, $this->testCase); }
public function addVariationEcho() { $this->testCase[] = "echo \"*** Test substituting argument " . $this->argumentNumber . " with " . $this->variationData . " values ***\\n\";"; $this->testCase = gtCodeSnippet::appendBlankLines(1, $this->testCase); }
/** * Add function or method initilaisation statements to the test case * */ public function argInit() { $statements = $this->subject->getInitialisationStatements(); foreach ($statements as $statement) { $this->testCase[] = $statement; } $this->testCase = gtCodeSnippet::appendBlankLines(2, $this->testCase); }