/** * @expectedException LogicException */ public function testReplaceElementWithoutParentNode() { $element = new Element('div', 'Foo'); $element->replace(new Element('div', 'Bar')); }