Page MenuHomePhorge

PhutilJSONTestCase.php
No OneTemporary

PhutilJSONTestCase.php

<?php
final class PhutilJSONTestCase extends PhutilTestCase {
public function testEmptyArrayEncoding() {
$serializer = new PhutilJSON();
$expect = <<<EOJSON
{
"x": []
}
EOJSON;
$this->assertEqual(
$expect,
$serializer->encodeFormatted(array('x' => array())),
pht('Empty arrays should serialize as `%s`, not `%s`.', '[]', '{}'));
}
}

File Metadata

Mime Type
text/x-php
Expires
Mon, Mar 24, 09:03 (3 w, 3 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1204816
Default Alt Text
PhutilJSONTestCase.php (375 B)

Event Timeline