source: branches/version-2_4/data/module/Calendar/tests/decorator_uri_test.php @ 18734

Revision 18734, 1.3 KB checked in by nanasess, 14 years ago (diff)

Copyright の更新(#601)

Line 
1<?php
2// $Id: decorator_uri_test.php,v 1.2 2004/07/08 10:18:48 quipo Exp $
3
4require_once('simple_include.php');
5require_once('calendar_include.php');
6
7require_once('./decorator_test.php');
8
9class TestOfDecoratorUri extends TestOfDecorator {
10    function TestOfDecoratorUri() {
11        $this->UnitTestCase('Test of Calendar_Decorator_Uri');
12    }
13    function testFragments() {
14        $Uri = new Calendar_Decorator_Uri($this->mockcal);
15        $Uri->setFragments('year','month','day','hour','minute','second');
16        $this->assertEqual('year=&amp;month=&amp;day=&amp;hour=&amp;minute=&amp;second=',$Uri->this('second'));
17    }
18    function testScalarFragments() {
19        $Uri = new Calendar_Decorator_Uri($this->mockcal);
20        $Uri->setFragments('year','month','day','hour','minute','second');
21        $Uri->setScalar();
22        $this->assertEqual('&amp;&amp;&amp;&amp;&amp;',$Uri->this('second'));
23    }
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'));
29    }
30}
31
32if (!defined('TEST_RUNNING')) {
33    define('TEST_RUNNING', true);
34    $test = &new TestOfDecoratorUri();
35    $test->run(new HtmlReporter());
36}
37?>
Note: See TracBrowser for help on using the repository browser.