Back to index

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