OSDN Git Service

初回コミット(v2.6.17.1)
[magic3/magic3.git] / include / lib / Calendar-0.5.5 / tests / decorator_uri_test.php
1 <?php
2 // $Id: decorator_uri_test.php 4940 2012-06-06 02:20:28Z fishbone $
3
4 require_once('simple_include.php');
5 require_once('calendar_include.php');
6
7 require_once('./decorator_test.php');
8
9 class 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
32 if (!defined('TEST_RUNNING')) {
33     define('TEST_RUNNING', true);
34     $test = &new TestOfDecoratorUri();
35     $test->run(new HtmlReporter());
36 }
37 ?>