Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F108706244
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
Fri, Apr 18, 02:35
Size
520 B
Mime Type
text/x-php
Expires
Sun, Apr 20, 02:35 (2 d)
Engine
blob
Format
Raw Data
Handle
25639943
Attached To
rPHU libphutil
PhutilSafeHTMLTestCase.php
View Options
<?php
/**
* @group testcase
*/
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