Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F92638928
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
Fri, Nov 22, 07:21
Size
382 B
Mime Type
text/x-php
Expires
Sun, Nov 24, 07:21 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22475949
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