private function getLocationServiceMock() { static $mock; if ($mock === null) { $mock = $this->getMockBuilder('eZ\\Publish\\API\\Repository\\LocationService')->getMock(); } return $mock; }