Exemplo n.º 1
0
    public function testCloningFromDescendantNode()
    {
        $node = new SimpleDOM('<node>
				<child1><granchild1 /></child1>
				<child2 />
				<child3><granchild3 /></child3>
			</node>');
        $node->cloneChildrenFrom($node->child1, true);
        $this->assertXmlStringEqualsXmlString('<node>
				<child1><granchild1 /></child1>
				<child2 />
				<child3><granchild3 /></child3>

				<granchild1 />
			</node>', $node->asXML());
    }