public function testChild() { $c = new Child('p', 'This is a paragraph', new Child('p', 'This is another paragraph')); $c->setAttributes('class', 'some-class'); $this->assertEquals('p', $c->getNodeName()); $this->assertEquals('This is a paragraph', $c->getNodeValue()); $this->assertEquals('some-class', $c->getAttribute('class')); }