public function removeCallsOnNodeWithNonMatchingContextMaterializesNodeData() { $node = $this->setUpNodeWithNonMatchingContext(array('getChildNodes')); $node->expects($this->once())->method('getChildNodes')->will($this->returnValue(array())); $node->getNodeData()->expects($this->once())->method('setRemoved'); $node->remove(); }