예제 #1
0
 /**
  * Test the merge method.
  *
  * @return void
  */
 public function testMerge()
 {
     $json = new JsonArray(['test' => ['key1' => 'value1', 'key2' => 'value2']]);
     $json->merge(['test' => ['key1' => 'value1', 'key2' => 'foobar', 'key3' => 'three']]);
     $this->assertEquals(['test'], $json->getEntries('/'));
     $this->assertEquals(['test/key1', 'test/key2', 'test/key3'], $json->getEntries('/test'));
     $this->assertEquals('foobar', $json->get('/test/key2'));
 }