public function testDuplicateDataSynchronization() { $synchronization = new Horde_Kolab_Storage_Synchronization(); $data = $this->getMock('Horde_Kolab_Storage_Data_Base', array(), array(), '', false, false); $data->expects($this->once())->method('synchronize'); $synchronization->synchronizeData($data); $synchronization->synchronizeData($data); }
/** * Return a data handler for accessing data in the specified * folder. * * @param string $folder The name of the folder. * @param string $object_type The type of data we want to * access in the folder. * @param int $data_version Format version of the object data. * * @return Horde_Kolab_Storage_Data The data object. */ public function getData($folder, $object_type = null, $data_version = 1) { $data = $this->_storage->getData($folder, $object_type, $data_version); $this->_synchronization->synchronizeData($data); return $data; }
/** * Synchronize the provided data in case the selected synchronization * strategy requires it. * * @param Horde_Kolab_Storage_Data $data The data to synchronize. */ public function synchronizeData(Horde_Kolab_Storage_Data $data) { $this->_strategy->synchronizeData($data); }