private function getCommunicationMock($methodsToOverwrite) { return $this->getMockBuilder('\\Piwik\\Plugins\\CoreUpdater\\UpdateCommunication')->setMethods($methodsToOverwrite)->getMock(); }