UnitTestCase('Test of Calendar_Util_Uri'); } function setUp() { $this->MockCal = & new Mock_Calendar_Day($this); $this->MockCal->setReturnValue('getEngine',new Mock_Calendar_Engine($this)); } function testFragments() { $Uri = new Calendar_Util_Uri('y','m','d','h','m','s'); $Uri->setFragments('year','month','day','hour','minute','second'); $this->assertEqual( 'year=&month=&day=&hour=&minute=&second=', $Uri->this($this->MockCal, 'second') ); } function testScalarFragments() { $Uri = new Calendar_Util_Uri('year','month','day','hour','minute','second'); $Uri->scalar = true; $this->assertEqual( '&&&&&', $Uri->this($this->MockCal, 'second') ); } function testSetSeperator() { $Uri = new Calendar_Util_Uri('year','month','day','hour','minute','second'); $Uri->separator = '/'; $this->assertEqual( 'year=/month=/day=/hour=/minute=/second=', $Uri->this($this->MockCal, 'second') ); } } if (!defined('TEST_RUNNING')) { define('TEST_RUNNING', true); $test = &new TestOfUtilUri(); $test->run(new HtmlReporter()); } ?>