2 // $Id: decorator_uri_test.php 4940 2012-06-06 02:20:28Z fishbone $
4 require_once('simple_include.php');
5 require_once('calendar_include.php');
7 require_once('./decorator_test.php');
9 class TestOfDecoratorUri extends TestOfDecorator {
10 function TestOfDecoratorUri() {
11 $this->UnitTestCase('Test of Calendar_Decorator_Uri');
13 function testFragments() {
14 $Uri = new Calendar_Decorator_Uri($this->mockcal);
15 $Uri->setFragments('year','month','day','hour','minute','second');
16 $this->assertEqual('year=&month=&day=&hour=&minute=&second=',$Uri->this('second'));
18 function testScalarFragments() {
19 $Uri = new Calendar_Decorator_Uri($this->mockcal);
20 $Uri->setFragments('year','month','day','hour','minute','second');
22 $this->assertEqual('&&&&&',$Uri->this('second'));
24 function testSetSeperator() {
25 $Uri = new Calendar_Decorator_Uri($this->mockcal);
26 $Uri->setFragments('year','month','day','hour','minute','second');
27 $Uri->setSeparator('/');
28 $this->assertEqual('year=/month=/day=/hour=/minute=/second=',$Uri->this('second'));
32 if (!defined('TEST_RUNNING')) {
33 define('TEST_RUNNING', true);
34 $test = &new TestOfDecoratorUri();
35 $test->run(new HtmlReporter());