Back to index

php5  5.3.10
gtBasicTestCaseMethod.php
Go to the documentation of this file.
00001 <?php
00002 
00006 class gtBasicTestCaseMethod extends gtBasicTestCase {
00007 
00008   public function __construct($opt) {
00009     $this->optionalSections = $opt;
00010   }
00011 
00017   public function setMethod($method) {
00018     $this->subject = $method;
00019   }
00020   
00021 public function constructTestCase() {
00022     $this->constructCommonHeaders();
00023 
00024     $this->addBasicEcho();
00025     
00026     $this->constructorArgInit();
00027     $this->constructorCreateInstance();
00028     
00029     $this->constructSubjectCalls();
00030     
00031     $this->constructCommonClosing();
00032     
00033   }
00034 
00035   public function testHeader() {
00036     $this->testCase[] = "--TEST--";
00037     $this->testCase[] = "Test class ".$this->subject->getClassName()." method  ".$this->subject->getName()."() by calling it with its expected arguments";
00038     
00039   }
00040   
00041   public function subjectCalls() {
00042     $lists = $this->subject->getValidArgumentLists();
00043 
00044     foreach($lists as $list){
00045       $this->testCase[] = "var_dump( \$class->".$this->subject->getName()."( ".$list." ) );";
00046       $this->testCase = gtCodeSnippet::appendBlankLines(1, $this->testCase );
00047     }
00048     $this->testCase = gtCodeSnippet::appendBlankLines(2, $this->testCase );    
00049   }
00050 
00051 }
00052 ?>