Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F107330491
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
Mon, Apr 7, 05:44
Size
382 B
Mime Type
text/x-php
Expires
Wed, Apr 9, 05:44 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
25398801
Attached To
rPHU libphutil
PhutilJSONTestCase.php
View Options
<?php
/**
* @group testcase
*/
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