示例#1
0
 public function init()
 {
     self::$n = new Node();
     self::$n0 = new Node($i = ['attr' => ['class' => 'main']]);
     self::$n1 = new Node($i = ['attr' => ['class' => 'main bold']]);
     self::$n2 = new Node($i = ['kind' => 't1']);
     self::$n->append([self::$n0, self::$n1, self::$n2]);
 }
示例#2
0
 /**
  * @depends testAppend
  */
 public function testRemoveChild()
 {
     $n = new Node();
     $child = new Node();
     $n->append([$child]);
     $n->removeChild($child);
     $this->assertEquals(0, $n->count());
 }