Back to index

php5  5.3.10
gtVariationContainerFunction.php
Go to the documentation of this file.
00001 <?php
00002 
00006 class gtVariationContainerFunction extends gtVariationContainer {
00007   
00008   protected $function;
00009   protected $optionalSections;
00010   
00011   public function __construct($osl) {
00012     $this->optionalSections = $osl;
00013   }
00014   
00020   public function setFunction(gtFunction $function) {
00021     $this->function = $function;
00022   }
00023   
00024   
00029   public function constructAll() {
00030     
00031         
00032     $numberOfArguments = count($this->function->getMandatoryArgumentNames()) + count($this->function->getOptionalArgumentNames());
00033     for($i = 1; $i <= $numberOfArguments; $i++) {
00034       foreach ($this->dataTypes as $d) {
00035         $testCase = gtVariationTestCase::getInstance($this->optionalSections);
00036         $testCase->setUp($this->function, $i, $d);
00037         $testCase->constructTestCase();
00038         $this->variationTests[] = $testCase->toString();
00039       }
00040     }
00041   }  
00042 }
00043 ?>