Back to index

php5  5.3.10
gtVariationTestCaseFunctionTest.php
Go to the documentation of this file.
00001 <?php
00002 require_once 'PHPUnit/Framework.php';
00003 require_once dirname(__FILE__) . '/../src/gtAutoload.php';
00004 
00005 class gtVariationTestCaseFunctionTest extends PHPUnit_Framework_TestCase {
00006 
00007   public function testTestCase() {
00008    
00009     $f = new gtFunction('cos');
00010     $f->setArgumentNames();
00011     $f->setArgumentLists();
00012     
00013     $optSect = new gtOptionalSections();
00014     
00015     $vtc = gtVariationTestCase::getInstance($optSect);
00016     $vtc->setUp($f, 1, 'int');
00017     $vtc->constructTestCase();
00018     
00019     $fs = $vtc->toString();
00020     $this->assertTrue(is_string($fs));
00021     
00022   }
00023 
00024   public function testTestCase2() {
00025     
00026     $f = new gtFunction('date_sunrise');
00027     $f->setArgumentNames();
00028     $f->setArgumentLists();
00029     $a = $f->getMandatoryArgumentNames();
00030     
00031     $optSect = new gtOptionalSections();
00032     
00033     $vtc = gtVariationTestCase::getInstance($optSect);
00034     $vtc->setUp($f, 6, 'int');
00035     $vtc->constructTestCase();
00036     
00037     $fs = $vtc->toString();
00038     $this->assertTrue(is_string($fs));
00039     
00040   }
00041   
00042   public function testTestCase3() {
00043     
00044     $f = new gtFunction('date_sunrise');
00045     $f->setArgumentNames();
00046     $f->setArgumentLists();
00047     
00048     $optSect = new gtOptionalSections();
00049 
00050     $vtc = gtVariationTestCase::getInstance($optSect);
00051     $vtc->setUp($f, 6, 'array');
00052     $vtc->constructTestCase();
00053     
00054     $fs = $vtc->toString();
00055     $this->assertTrue(is_string($fs));
00056     
00057   }
00058 }
00059 ?>