find('p') as $node) $doc2->find('body')->append(pq($node)); $testResult = $doc2->find('p'); if ( $testResult->size() == 2*$doc1->find('p')->size() ) print "Test '{$testName}' PASSED :)"; else { print "Test '{$testName}' FAILED !!!
"; $testResult->whois(); } $testName = 'Multi document append DOMNode'; $testResult = array( 'p.body', ); $doc1 = phpQuery::newDocumentFile('test.html'); $doc2 = phpQuery::newDocumentFile('test.html'); foreach ($doc1->find('p') as $node) $doc2->find('body')->append($node); $testResult = $doc2->find('p'); if ( $testResult->size() == 2*$doc1->find('p')->size() ) print "Test '{$testName}' PASSED :)"; else { print "Test '{$testName}' FAILED !!!
"; $testResult->whois(); } ?>