12 require_once
'PU_testcase_dcp_document.php';
32 parent::setUpBeforeClass();
35 self::beginTransaction();
37 self::importDocument(
"PU_data_dcp_documentlink.ods");
39 self::importDocument(
"PU_data_dcp_documentslink.xml");
44 self::rollbackTransaction();
53 $this->assertTrue(
$doc->isAlive() ,
"document $docName is not alive");
54 $url =
$doc->urlWhatEncode($link);
55 $this->assertEquals($expectedLink, $url,
"url link is not correctly encoded");
64 $this->assertTrue(
$doc->isAlive() ,
"document $docName is not alive");
65 foreach ($params as $k => $v) {
69 $url =
$doc->urlWhatEncode($link);
70 $this->assertEquals($expectedLink, $url,
"url link is not correctly encoded");
78 "http://www.test.com/{PU_TEST1}",
80 "PU_TEST1" =>
"testOne"
82 "http://www.test.com/testOne"
86 "http://www.test.com/{PU_TEST2}",
88 "PU_TEST2" =>
"test Two"
90 "http://www.test.com/test%20Two"
100 "http://www.test.com/",
101 "http://www.test.com/"
105 "http://test.com/%tst_title%/",
106 "http://test.com/Test/"
110 "http://test.com/?title=%tst_title%&long=%tst_longtext%",
111 "http://test.com/?title=Test&long=Long"
115 "http://test.com/?title=%tst_title%&long=%tst_longtext%",
116 "http://test.com/?title=Arbre%20%2B%20Feuilles&long=La%20nature%20est%20jolie%20%3Cen%20automne%3E"
120 "http://test.com/?title=%aa_one%",
121 "http://test.com/?title=Un"
125 "http://test.com/?title=%AA_ONE%",
126 "http://test.com/?title=Un"
130 "http://test.com/?title=%tst_title%",
131 "http://test.com/?title=Joe%20%26%20Jane"
135 "http://test.com/?long=%tst_longtext%",
136 "http://test.com/?long=Premi%C3%A8re%20ligne%5CnEt%20deuxi%C3%A8me%20ligne"
140 "http://test.com/?date=%tst_coldate%",
141 'http://test.com/?date=2011-11-01%5Cn2011-11-02'
145 "http://test.com/?date=%tst_nothing%",
150 "http://test.com/?title=%title%",
151 "http://test.com/?title=Joe%20%26%20Jane"
155 "http://test.com/?title=%TITLE%",
156 "http://test.com/?title=Joe%20%26%20Jane"
160 "http://test.com/?title=%T%",
161 "http://test.com/?title=Joe%20%26%20Jane"
165 "http://test.com/?title=%%2T",
166 "http://test.com/?title=%2T"
170 "http://test.com/?title=%3A",
171 "http://test.com/?title=%3A"
175 "http://test.com/?title=%3A%3ATest%28%29",
176 "http://test.com/?title=%3A%3ATest%28%29"
180 "http://test.com/?title=%3A%3A%T%%28%29",
181 "http://test.com/?title=%3A%3AJoe%20%26%20Jane%28%29"
185 "http://test.com/?title=%TITLE%&option=%?OPTIONONE%",
186 "http://test.com/?title=Joe%20%26%20Jane&option="
190 "http://test.com/?title=%TITLE%&option1=%?OPTIONONE%&hard=true&option2=%?OPTIONTWO%",
191 "http://test.com/?title=Joe%20%26%20Jane&option1=&hard=true&option2="
201 "http://www.test.net/"
205 "%::linkOne()%?a=%T%",
206 "http://www.test.net/?a=Joe%20%26%20Jane"
211 "http://www.test.net/?b=Joe%20%26%20Jane"
static setUpBeforeClass()
testParamLinkCompose($docName, $link, array $params, $expectedLink)
testAttrLinkCompose($docName, $link, $expectedLink)
static tearDownAfterClass()