Example #1
0
 /**
  * Tests getting the children of a node.
  *
  * @group	JNode
  * @covers	JNode::getChildren
  * @return void
  */
 public function testGetChildren()
 {
     $this->assertEquals(array(), $this->object->getChildren(), 'New node should have null children');
     $this->assertAttributeEquals(array(), '_children', $this->object);
     $newChild = new JNode();
     $this->object->addChild($newChild);
     $this->assertEquals(array(spl_object_hash($newChild) => $newChild), $this->object->getChildren(), 'Node should have the created child');
     $this->assertAttributeEquals(array(spl_object_hash($newChild) => $newChild), '_children', $this->object);
 }