~ubuntu-branches/ubuntu/raring/php5/raring

« back to all changes in this revision

Viewing changes to ext/standard/tests/strings/get_html_translation_table_basic7.phpt

  • Committer: Package Import Robot
  • Author(s): Clint Byrum
  • Date: 2012-06-18 16:10:26 UTC
  • mfrom: (1.1.24) (0.3.58 sid)
  • Revision ID: package-import@ubuntu.com-20120618161026-hg1fc5r9z1a4hlqz
Tags: 5.4.4-1ubuntu1
* Merge from Debian unstable. Remaining changes:
  - d/rules: Simplify apache config settings since we never build 
    interbase or firebird.
  - debian/rules: export DEB_HOST_MULTIARCH properly.
  - Add build-dependency on lemon, which we now need.
  - Dropped firebird2.1-dev, libc-client-dev, libmcrypt-dev as it is in universe.
  - Dropped libcurl-dev not in the archive.
  - debian/control: replace build-depends on mysql-server with
    mysql-server-core-5.5 and mysql-client-5.5 to avoid upstart and
    mysql-server-5.5 postinst confusion with starting up multiple
    mysqlds listening on the same port.
  - Dropped php5-imap, php5-interbase, php5-mcrypt since we have versions
    already in universe.
  - Dropped libonig-dev and libqgdbm since its in universe. (libonig MIR
    has been declined due to an inactive upstream. So this is probably
    a permanent change).
  - modulelist: Drop imap, interbase, sybase, and mcrypt.
  - debian/rules:
    * Dropped building of mcrypt, imap, and interbase.
    * Install apport hook for php5.
    * stop mysql instance on clean just in case we failed in tests
* Dropped Changes:
  * d/rules: enable Suhosin patch with PHP5_SUHOSIN=yes -- Upstream suhosin
    has been slow to adopt PHP 5.4, and is showing signs of disengagement.
    Therefore, we will follow Debian's lead and drop Suhosin for now.
  - d/control: build-depend on mysql 5.5 instead of 5.1 for running tests.
    -- Debian just deps on mysql-server
  - Suggest php5-suhosin rather than recommends. -- Dropping suhosin
  - d/setup-mysql.sh: modify to work with mysql 5.5 differences -- superseded
    in Debian.
  - Only build php5-sqlite for sqlite3, dropping the obsolete sqlite2. --
    superseded in Debian
  - d/maxlifetime: Improve maxlifetime script to scan for more SAPIs and 
    scan all *.ini in conf.d directory. -- Change came from Debian
  - d/libapache2-mod-php5.postinst,libapache2-mod-php5filter.postinst: 
    Restart apache on first install to ensure module is fully enabled.
    -- Change came from Debian
  - debian/patches/php5-CVE-2012-1823.patch: filter query strings that
    are prefixed with '-' -- Fixed upstream
  - debian/control: Recommend php5-dev for php-pear. -- This was a poorly
    conceived idea anyway.
  - Pre-Depend on a new enough version of dpkg for dpkg-maintscript-helper
    rather than checking whether it exists at run-time, leading to more
    predictable behaviour on upgrades. -- Applied in Debian
  - d/p/gd-multiarch-fix.patch: superseded
* d/NEWS: add note explaining that SUHOSIN is no longer enabled in the
  Ubuntu packages.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--TEST--
 
2
Test get_html_translation_table() function : basic functionality - XHTML 1.0
 
3
--FILE--
 
4
<?php
 
5
echo "*** Testing get_html_translation_table() : basic functionality/XHTML 1.0 ***\n";
 
6
 
 
7
echo "-- with table = HTML_ENTITIES, ENT_QUOTES --\n";
 
8
$table = HTML_ENTITIES;
 
9
/* uses &#039; to share the code path with HTML 4.01 */
 
10
$tt = get_html_translation_table($table, ENT_QUOTES | ENT_XHTML, "UTF-8");
 
11
asort( $tt );
 
12
var_dump( count($tt) );
 
13
print_r( $tt );
 
14
 
 
15
echo "-- with table = HTML_ENTITIES, ENT_COMPAT --\n";
 
16
$table = HTML_ENTITIES;
 
17
$tt = get_html_translation_table($table, ENT_COMPAT | ENT_XHTML, "UTF-8");
 
18
var_dump( count($tt) );
 
19
 
 
20
echo "-- with table = HTML_ENTITIES, ENT_NOQUOTES --\n";
 
21
$table = HTML_ENTITIES;
 
22
$tt = get_html_translation_table($table, ENT_NOQUOTES | ENT_XHTML, "UTF-8");
 
23
var_dump( count($tt) );
 
24
 
 
25
echo "-- with table = HTML_SPECIALCHARS, ENT_COMPAT --\n";
 
26
$table = HTML_SPECIALCHARS; 
 
27
$tt = get_html_translation_table($table, ENT_COMPAT, "UTF-8");
 
28
asort( $tt );
 
29
var_dump( count($tt) );
 
30
print_r( $tt );
 
31
 
 
32
echo "-- with table = HTML_SPECIALCHARS, ENT_QUOTES --\n";
 
33
$table = HTML_SPECIALCHARS;
 
34
$tt = get_html_translation_table($table, ENT_QUOTES | ENT_XHTML, "UTF-8");
 
35
asort( $tt );
 
36
var_dump( $tt );
 
37
 
 
38
echo "-- with table = HTML_SPECIALCHARS, ENT_NOQUOTES --\n";
 
39
$table = HTML_SPECIALCHARS;
 
40
$tt = get_html_translation_table($table, ENT_NOQUOTES | ENT_XHTML, "UTF-8");
 
41
asort( $tt );
 
42
var_dump( $tt );
 
43
 
 
44
 
 
45
echo "Done\n";
 
46
?>
 
47
--EXPECT--
 
48
*** Testing get_html_translation_table() : basic functionality/XHTML 1.0 ***
 
49
-- with table = HTML_ENTITIES, ENT_QUOTES --
 
50
int(253)
 
51
Array
 
52
(
 
53
    ['] => &#039;
 
54
    [Æ] => &AElig;
 
55
    [Á] => &Aacute;
 
56
    [Â] => &Acirc;
 
57
    [À] => &Agrave;
 
58
    [Α] => &Alpha;
 
59
    [Å] => &Aring;
 
60
    [Ã] => &Atilde;
 
61
    [Ä] => &Auml;
 
62
    [Β] => &Beta;
 
63
    [Ç] => &Ccedil;
 
64
    [Χ] => &Chi;
 
65
    [‡] => &Dagger;
 
66
    [Δ] => &Delta;
 
67
    [Ð] => &ETH;
 
68
    [É] => &Eacute;
 
69
    [Ê] => &Ecirc;
 
70
    [È] => &Egrave;
 
71
    [Ε] => &Epsilon;
 
72
    [Η] => &Eta;
 
73
    [Ë] => &Euml;
 
74
    [Γ] => &Gamma;
 
75
    [Í] => &Iacute;
 
76
    [Î] => &Icirc;
 
77
    [Ì] => &Igrave;
 
78
    [Ι] => &Iota;
 
79
    [Ï] => &Iuml;
 
80
    [Κ] => &Kappa;
 
81
    [Λ] => &Lambda;
 
82
    [Μ] => &Mu;
 
83
    [Ñ] => &Ntilde;
 
84
    [Ν] => &Nu;
 
85
    [Œ] => &OElig;
 
86
    [Ó] => &Oacute;
 
87
    [Ô] => &Ocirc;
 
88
    [Ò] => &Ograve;
 
89
    [Ω] => &Omega;
 
90
    [Ο] => &Omicron;
 
91
    [Ø] => &Oslash;
 
92
    [Õ] => &Otilde;
 
93
    [Ö] => &Ouml;
 
94
    [Φ] => &Phi;
 
95
    [Π] => &Pi;
 
96
    [″] => &Prime;
 
97
    [Ψ] => &Psi;
 
98
    [Ρ] => &Rho;
 
99
    [Š] => &Scaron;
 
100
    [Σ] => &Sigma;
 
101
    [Þ] => &THORN;
 
102
    [Τ] => &Tau;
 
103
    [Θ] => &Theta;
 
104
    [Ú] => &Uacute;
 
105
    [Û] => &Ucirc;
 
106
    [Ù] => &Ugrave;
 
107
    [Υ] => &Upsilon;
 
108
    [Ü] => &Uuml;
 
109
    [Ξ] => &Xi;
 
110
    [Ý] => &Yacute;
 
111
    [Ÿ] => &Yuml;
 
112
    [Ζ] => &Zeta;
 
113
    [á] => &aacute;
 
114
    [â] => &acirc;
 
115
    [´] => &acute;
 
116
    [æ] => &aelig;
 
117
    [à] => &agrave;
 
118
    [ℵ] => &alefsym;
 
119
    [α] => &alpha;
 
120
    [&] => &amp;
 
121
    [∧] => &and;
 
122
    [∠] => &ang;
 
123
    [å] => &aring;
 
124
    [≈] => &asymp;
 
125
    [ã] => &atilde;
 
126
    [ä] => &auml;
 
127
    [„] => &bdquo;
 
128
    [β] => &beta;
 
129
    [¦] => &brvbar;
 
130
    [•] => &bull;
 
131
    [∩] => &cap;
 
132
    [ç] => &ccedil;
 
133
    [¸] => &cedil;
 
134
    [¢] => &cent;
 
135
    [χ] => &chi;
 
136
    [ˆ] => &circ;
 
137
    [♣] => &clubs;
 
138
    [≅] => &cong;
 
139
    [©] => &copy;
 
140
    [↵] => &crarr;
 
141
    [∪] => &cup;
 
142
    [¤] => &curren;
 
143
    [⇓] => &dArr;
 
144
    [†] => &dagger;
 
145
    [↓] => &darr;
 
146
    [°] => &deg;
 
147
    [δ] => &delta;
 
148
    [♦] => &diams;
 
149
    [÷] => &divide;
 
150
    [é] => &eacute;
 
151
    [ê] => &ecirc;
 
152
    [è] => &egrave;
 
153
    [∅] => &empty;
 
154
    [ ] => &emsp;
 
155
    [ ] => &ensp;
 
156
    [ε] => &epsilon;
 
157
    [≡] => &equiv;
 
158
    [η] => &eta;
 
159
    [ð] => &eth;
 
160
    [ë] => &euml;
 
161
    [€] => &euro;
 
162
    [∃] => &exist;
 
163
    [ƒ] => &fnof;
 
164
    [∀] => &forall;
 
165
    [½] => &frac12;
 
166
    [¼] => &frac14;
 
167
    [¾] => &frac34;
 
168
    [⁄] => &frasl;
 
169
    [γ] => &gamma;
 
170
    [≥] => &ge;
 
171
    [>] => &gt;
 
172
    [⇔] => &hArr;
 
173
    [↔] => &harr;
 
174
    [♥] => &hearts;
 
175
    […] => &hellip;
 
176
    [í] => &iacute;
 
177
    [î] => &icirc;
 
178
    [¡] => &iexcl;
 
179
    [ì] => &igrave;
 
180
    [ℑ] => &image;
 
181
    [∞] => &infin;
 
182
    [∫] => &int;
 
183
    [ι] => &iota;
 
184
    [¿] => &iquest;
 
185
    [∈] => &isin;
 
186
    [ï] => &iuml;
 
187
    [κ] => &kappa;
 
188
    [⇐] => &lArr;
 
189
    [λ] => &lambda;
 
190
    [〈] => &lang;
 
191
    [«] => &laquo;
 
192
    [←] => &larr;
 
193
    [⌈] => &lceil;
 
194
    [“] => &ldquo;
 
195
    [≤] => &le;
 
196
    [⌊] => &lfloor;
 
197
    [∗] => &lowast;
 
198
    [◊] => &loz;
 
199
    [‎] => &lrm;
 
200
    [‹] => &lsaquo;
 
201
    [‘] => &lsquo;
 
202
    [<] => &lt;
 
203
    [¯] => &macr;
 
204
    [—] => &mdash;
 
205
    [µ] => &micro;
 
206
    [·] => &middot;
 
207
    [−] => &minus;
 
208
    [μ] => &mu;
 
209
    [∇] => &nabla;
 
210
    [ ] => &nbsp;
 
211
    [–] => &ndash;
 
212
    [≠] => &ne;
 
213
    [∋] => &ni;
 
214
    [¬] => &not;
 
215
    [∉] => &notin;
 
216
    [⊄] => &nsub;
 
217
    [ñ] => &ntilde;
 
218
    [ν] => &nu;
 
219
    [ó] => &oacute;
 
220
    [ô] => &ocirc;
 
221
    [œ] => &oelig;
 
222
    [ò] => &ograve;
 
223
    [‾] => &oline;
 
224
    [ω] => &omega;
 
225
    [ο] => &omicron;
 
226
    [⊕] => &oplus;
 
227
    [∨] => &or;
 
228
    [ª] => &ordf;
 
229
    [º] => &ordm;
 
230
    [ø] => &oslash;
 
231
    [õ] => &otilde;
 
232
    [⊗] => &otimes;
 
233
    [ö] => &ouml;
 
234
    [¶] => &para;
 
235
    [∂] => &part;
 
236
    [‰] => &permil;
 
237
    [⊥] => &perp;
 
238
    [φ] => &phi;
 
239
    [π] => &pi;
 
240
    [ϖ] => &piv;
 
241
    [±] => &plusmn;
 
242
    [£] => &pound;
 
243
    [′] => &prime;
 
244
    [∏] => &prod;
 
245
    [∝] => &prop;
 
246
    [ψ] => &psi;
 
247
    ["] => &quot;
 
248
    [⇒] => &rArr;
 
249
    [√] => &radic;
 
250
    [〉] => &rang;
 
251
    [»] => &raquo;
 
252
    [→] => &rarr;
 
253
    [⌉] => &rceil;
 
254
    [”] => &rdquo;
 
255
    [ℜ] => &real;
 
256
    [®] => &reg;
 
257
    [⌋] => &rfloor;
 
258
    [ρ] => &rho;
 
259
    [‏] => &rlm;
 
260
    [›] => &rsaquo;
 
261
    [’] => &rsquo;
 
262
    [‚] => &sbquo;
 
263
    [š] => &scaron;
 
264
    [⋅] => &sdot;
 
265
    [§] => &sect;
 
266
    [­] => &shy;
 
267
    [σ] => &sigma;
 
268
    [ς] => &sigmaf;
 
269
    [∼] => &sim;
 
270
    [♠] => &spades;
 
271
    [⊂] => &sub;
 
272
    [⊆] => &sube;
 
273
    [∑] => &sum;
 
274
    [¹] => &sup1;
 
275
    [²] => &sup2;
 
276
    [³] => &sup3;
 
277
    [⊃] => &sup;
 
278
    [⊇] => &supe;
 
279
    [ß] => &szlig;
 
280
    [τ] => &tau;
 
281
    [∴] => &there4;
 
282
    [θ] => &theta;
 
283
    [ϑ] => &thetasym;
 
284
    [ ] => &thinsp;
 
285
    [þ] => &thorn;
 
286
    [˜] => &tilde;
 
287
    [×] => &times;
 
288
    [™] => &trade;
 
289
    [⇑] => &uArr;
 
290
    [ú] => &uacute;
 
291
    [↑] => &uarr;
 
292
    [û] => &ucirc;
 
293
    [ù] => &ugrave;
 
294
    [¨] => &uml;
 
295
    [ϒ] => &upsih;
 
296
    [υ] => &upsilon;
 
297
    [ü] => &uuml;
 
298
    [℘] => &weierp;
 
299
    [ξ] => &xi;
 
300
    [ý] => &yacute;
 
301
    [¥] => &yen;
 
302
    [ÿ] => &yuml;
 
303
    [ζ] => &zeta;
 
304
    [‍] => &zwj;
 
305
    [‌] => &zwnj;
 
306
)
 
307
-- with table = HTML_ENTITIES, ENT_COMPAT --
 
308
int(252)
 
309
-- with table = HTML_ENTITIES, ENT_NOQUOTES --
 
310
int(251)
 
311
-- with table = HTML_SPECIALCHARS, ENT_COMPAT --
 
312
int(4)
 
313
Array
 
314
(
 
315
    [&] => &amp;
 
316
    [>] => &gt;
 
317
    [<] => &lt;
 
318
    ["] => &quot;
 
319
)
 
320
-- with table = HTML_SPECIALCHARS, ENT_QUOTES --
 
321
array(5) {
 
322
  ["&"]=>
 
323
  string(5) "&amp;"
 
324
  ["'"]=>
 
325
  string(6) "&apos;"
 
326
  [">"]=>
 
327
  string(4) "&gt;"
 
328
  ["<"]=>
 
329
  string(4) "&lt;"
 
330
  ["""]=>
 
331
  string(6) "&quot;"
 
332
}
 
333
-- with table = HTML_SPECIALCHARS, ENT_NOQUOTES --
 
334
array(3) {
 
335
  ["&"]=>
 
336
  string(5) "&amp;"
 
337
  [">"]=>
 
338
  string(4) "&gt;"
 
339
  ["<"]=>
 
340
  string(4) "&lt;"
 
341
}
 
342
Done
 
 
b'\\ No newline at end of file'