public function testGetChildrenFilterType() { $list = new CM_Dom_NodeList('<div><b>mega</b><i>cool</i>hello</div>'); $childrenText = $list->getChildren(XML_TEXT_NODE); $this->assertSame(1, $childrenText->count()); $this->assertSame('hello', $childrenText->getText()); $childrenElement = $list->getChildren(XML_ELEMENT_NODE); $this->assertSame(2, $childrenElement->count()); $this->assertSame('megacool', $childrenElement->getText()); }