1<?php 2require_once 'PHPUnit/Framework.php'; 3require_once dirname(__FILE__) . '/../src/gtAutoload.php'; 4 5class gtVariationTestCaseFunctionTest extends PHPUnit_Framework_TestCase { 6 7 public function testTestCase() { 8 9 $f = new gtFunction('cos'); 10 $f->setArgumentNames(); 11 $f->setArgumentLists(); 12 13 $optSect = new gtOptionalSections(); 14 15 $vtc = gtVariationTestCase::getInstance($optSect); 16 $vtc->setUp($f, 1, 'int'); 17 $vtc->constructTestCase(); 18 19 $fs = $vtc->toString(); 20 $this->assertTrue(is_string($fs)); 21 22 } 23 24 public function testTestCase2() { 25 26 $f = new gtFunction('date_sunrise'); 27 $f->setArgumentNames(); 28 $f->setArgumentLists(); 29 $a = $f->getMandatoryArgumentNames(); 30 31 $optSect = new gtOptionalSections(); 32 33 $vtc = gtVariationTestCase::getInstance($optSect); 34 $vtc->setUp($f, 6, 'int'); 35 $vtc->constructTestCase(); 36 37 $fs = $vtc->toString(); 38 $this->assertTrue(is_string($fs)); 39 40 } 41 42 public function testTestCase3() { 43 44 $f = new gtFunction('date_sunrise'); 45 $f->setArgumentNames(); 46 $f->setArgumentLists(); 47 48 $optSect = new gtOptionalSections(); 49 50 $vtc = gtVariationTestCase::getInstance($optSect); 51 $vtc->setUp($f, 6, 'array'); 52 $vtc->constructTestCase(); 53 54 $fs = $vtc->toString(); 55 $this->assertTrue(is_string($fs)); 56 57 } 58} 59?> 60