Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F96121994
PhutilSafeHTMLTestCase.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Dec 22, 21:15
Size
493 B
Mime Type
text/x-php
Expires
Tue, Dec 24, 21:15 (2 d)
Engine
blob
Format
Raw Data
Handle
23116628
Attached To
rPHU libphutil
PhutilSafeHTMLTestCase.php
View Options
<?php
final
class
PhutilSafeHTMLTestCase
extends
PhutilTestCase
{
public
function
testOperator
()
{
if
(!
extension_loaded
(
'operator'
))
{
$this
->
assertSkipped
(
'Operator extension not available.'
);
}
$a
=
phutil_tag
(
'a'
);
$ab
=
$a
.
phutil_tag
(
'b'
);
$this
->
assertEqual
(
'<a></a><b></b>'
,
$ab
->
getHTMLContent
());
$this
->
assertEqual
(
'<a></a>'
,
$a
->
getHTMLContent
());
$a
.=
phutil_tag
(
'a'
);
$this
->
assertEqual
(
'<a></a><a></a>'
,
$a
->
getHTMLContent
());
}
}
Event Timeline
Log In to Comment