|
@@ -128,6 +128,20 @@ class JsonFileTest extends \PHPUnit_Framework_TestCase
|
|
|
$this->assertJsonFormat($json, $data);
|
|
|
}
|
|
|
|
|
|
+ public function testFormatEmptyArray()
|
|
|
+ {
|
|
|
+ $data = array('test' => array(), 'test2' => new \stdClass);
|
|
|
+ $json = '{
|
|
|
+ "test": [
|
|
|
+
|
|
|
+ ],
|
|
|
+ "test2": {
|
|
|
+
|
|
|
+ }
|
|
|
+}';
|
|
|
+ $this->assertJsonFormat($json, $data);
|
|
|
+ }
|
|
|
+
|
|
|
public function testEscape()
|
|
|
{
|
|
|
$data = array("Metadata\\\"" => 'src/');
|