/** * Test Add/Remove Children * * @param string Name of child node to add and check * @param array Key=>Value array of attributes for child node. * * @return void * @dataProvider casesChildren */ function testAddAndRemoveChildren($name, $options) { $this->assertThat($this->object->children(), $this->equalTo(array())); $child = $this->object->addChild($name, $options); $this->assertThat($child, $this->isInstanceOf('JSimpleXMLElement')); $this->assertThat($child->attributes(), $this->equalTo($options)); $this->object->removeChild($child); $this->assertThat($this->object->children(), $this->equalTo(array())); }