コード例 #1
0
 public function testArrayDelimUnset()
 {
     $array = ['test' => ['test1' => 1, 'test2' => 2]];
     delim_unset($array, 'test.test1');
     $this->assertEquals(['test' => ['test2' => 2]], $array);
     delim_unset($array, 'test.test2');
     $this->assertEquals(['test' => []], $array);
 }
コード例 #2
0
 public function offsetUnset($path)
 {
     return delim_unset($this->data, $path, $this->getDelimiter());
 }