When doing the following, the div isn't removed from the html:
$objNode = new HtmlPageCrawler('<div class="test"><p>Hallo</p></div>');
$objNode->filter('.test')->remove();
$x = $objNode->saveHTML();
When doing $objNode->filter('p')->remove(); the p-elements are correctly removed. Also when wrapping the div in another div it also works.
So it seems that I cannot remove root elements, can I? At least a hint in the comment would've been nice ;-) Maybe the bug can be fixed.