1<?php
2
3/**
4 * Class for basic test case construction
5 */
6
7abstract class gtBasicTestCase extends gtTestCase {
8
9  protected $subject;
10
11
12  /**
13   * Returns an instance of a test case for a method or a function
14   *
15   * @param string $type
16   * @return test case object
17   */
18  public static function getInstance($optionalSections, $type = 'function') {
19    if($type == 'function') {
20      return new gtBasicTestCaseFunction($optionalSections);
21    }
22    if($type =='method') {
23      return new gtBasicTestCaseMethod($optionalSections);
24    }
25  }
26
27  public function constructSubjectCalls() {
28        $this->argInit();
29        $this->subjectCalls();
30  }
31
32  public function addBasicEcho() {
33    $this->testCase[] = "echo \"*** Test by calling method or function with its expected arguments ***\\n\";";
34    $this->testCase = gtCodeSnippet::appendBlankLines(1, $this->testCase );
35  }
36}
37?>
38