Exemplo n.º 1
0
 public function testDelete()
 {
     $data = ['type' => 'ninja', 'color' => 'black', 'font' => 'sans', 'margin' => ['left' => '15px', 'right' => 'delete-me'], 'small' => ['font' => 'monospace', 'test' => '(a < b)'], 'objects' => ['first' => 1, 'second' => 2]];
     $exp = $data;
     $node = new Node($data);
     //        $node->del('color');
     //        unset ($exp['color']);
     $node->del('margin.right');
     unset($exp['margin']['right']);
     $out = $node->getData();
     // $this->assertEquals($out, $exp);
     //        echo json_encode($out, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);
     //        echo json_encode($exp, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);
 }