HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux sa-dev.otherchirps.net 5.15.0-139-generic #149-Ubuntu SMP Fri Apr 11 22:06:13 UTC 2025 x86_64
User: www-data (33)
PHP: 8.0.30
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/html/wp-content/plugins/updraftplus/vendor/mikemccabe/json-patch-php/simplexml_tests.json
[
    { "comment": "simplexml promotion - add after scalar",
      "doc": { "foo":1 },
      "patch": [ { "op":"add", "path":"/foo/1", "value":2 } ],
      "expected": { "foo":[1, 2] } },

    { "comment": "simplexml promotion - add before scalar",
      "doc": { "foo":1 },
      "patch": [ { "op":"add", "path":"/foo/0", "value":2 } ],
      "expected": { "foo":[2, 1] } },

    { "comment": "simplexml promotion - append",
      "doc": { "foo":1 },
      "patch": [ { "op":"add", "path":"/foo/-", "value":2 } ],
      "expected": { "foo":[1, 2] } },

    { "comment": "append to array",
      "doc": { "foo":1 },
      "patch": [ { "op":"add", "path":"/foo/-", "value":2 } ],
      "expected": { "foo":[1, 2] } },

    { "comment": "mid-path 0-index with tail 0-index - append",
      "doc": { "foo": { "bar": 1 } },
      "patch": [ { "op":"add", "path":"/foo/0/bar/-", "value":2 }],
      "expected": { "foo": { "bar": [1,2] }} },

    { "comment": "Add 1-length array is equivalent to scalar add",
       "doc": { },
       "patch": [ { "op":"add", "path":"/foo/0", "value":1 } ],
       "expected": { "foo":1 },
       "disabled": true
     },

    { "comment": "simple 0-index of scalar ok",
      "doc": { "foo": 1 },
      "patch": [ { "op":"test", "path":"/foo/0", "value":1 }] },

    { "comment": "nested 0-index of scalar ok",
      "doc": { "foo": { "bar": 1 } },
      "patch": [ { "op":"test", "path":"/foo/bar/0", "value":1 }] },

    { "comment": "0-index after actual 0-index ok",
      "doc": { "foo": [{ "bar": 1 }, 1] },
      "patch": [ { "op":"test", "path":"/foo/0/bar/0", "value":1 }] },

    { "comment": "mid-path 0-index",
      "doc": { "foo": { "bar": [1, 2] } },
      "patch": [ { "op":"test", "path":"/foo/0/bar/0", "value":1 }] },

    { "comment": "mid-path 0-index with tail 0-index",
      "doc": { "foo": { "bar": 1 } },
      "patch": [ { "op":"test", "path":"/foo/0/bar/0", "value":1 }] },

    { "comment": "replace as array",
      "doc": { "foo":1 },
      "patch": [ { "op":"replace", "path":"/foo/0", "value":2 } ],
      "expected": { "foo":2 } },

    { "comment": "remove last demotes to singleton",
      "doc": { "foo":[1, 2] },
      "patch": [ { "op":"remove", "path":"/foo/1"} ],
      "expected": { "foo":1 } },

    { "comment": "tests complete" }
]