public function testGetDomNode() { $dom = new DOMDocument('1.0', 'iso-8859-1'); $ul = $dom->createElement('ul'); $ul->appendChild($dom->createElement('li', 'one')); $ul->appendChild($dom->createElement('li', 'two')); $this->assertEquals($ul, H::ul(H::li('one'), H::li('two'))->getDomNode()); }
public function instances() { $anchorObject = new StdClass(); $anchorObject->href = 'test'; return array(array('A', array('href' => 'test'), 'Replace'), array('A', $anchorObject, 'Replace'), array('Dom', new DOMText(), 'CleanAppend'), array('String', 'Hello World!', 'CleanAppend'), array('Traversable', array('one', 'two', 'three', 'pigs'), 'CleanAppend'), array('HtmlElement', H::ul(H::li('one')), 'Replace')); }