Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F61256183
PhutilJSONTestCase.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, May 5, 12:47
Size
354 B
Mime Type
text/x-php
Expires
Tue, May 7, 12:47 (2 d)
Engine
blob
Format
Raw Data
Handle
17486384
Attached To
rPHU libphutil
PhutilJSONTestCase.php
View Options
<?php
final
class
PhutilJSONTestCase
extends
PhutilTestCase
{
public
function
testEmptyArrayEncoding
()
{
$serializer
=
new
PhutilJSON
();
$expect
=
<<<EOJSON
{
"x": []
}
EOJSON;
$this
->
assertEqual
(
$expect
,
$serializer
->
encodeFormatted
(
array
(
'x'
=>
array
())),
'Empty arrays should serialize as [], not {}.'
);
}
}
Event Timeline
Log In to Comment