Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F121196304
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
Wed, Jul 9, 06:32
Size
493 B
Mime Type
text/x-php
Expires
Fri, Jul 11, 06:32 (2 d)
Engine
blob
Format
Raw Data
Handle
27295749
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