Copyright 2010-2016 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.
Author: Gunnar Wrobel (wrobel@pardus.de)
Example #1
0
 /**
  * Synchronize the listener.
  */
 public function synchronize()
 {
     $this->_sync->synchronize();
 }
Example #2
0
 public function testSetDefaultResetPreviousDefault()
 {
     $namespace = new Horde_Kolab_Storage_Folder_Namespace_Fixed('test');
     $driver = $this->getMock('Horde_Kolab_Storage_Driver');
     $driver->expects($this->exactly(2))->method('setAnnotation')->with($this->logicalOr('INBOX/Foo', 'INBOX/Bar'), Horde_Kolab_Storage_List_Query_List_Base::ANNOTATION_FOLDER_TYPE, $this->logicalOr('event.default', 'event'));
     $cache = $this->getMock('Horde_Kolab_Storage_List_Cache', array(), array(), '', false, false);
     $cache->expects($this->exactly(2))->method('hasNamespace')->will($this->returnValue(true));
     $cache->expects($this->once())->method('getNamespace')->will($this->returnValue(serialize($namespace)));
     $cache->expects($this->once())->method('getFolders')->will($this->returnValue(array('INBOX/Foo', 'INBOX/Bar')));
     $cache->expects($this->once())->method('getFolderTypes')->will($this->returnValue(array('INBOX/Foo' => 'event', 'INBOX/Bar' => 'event.default')));
     $cache->expects($this->once())->method('store')->with(array('INBOX/Foo', 'INBOX/Bar'), array('INBOX/Foo' => 'event.default', 'INBOX/Bar' => 'event'));
     $list = new Horde_Kolab_Storage_List_Query_List_Cache_Synchronization($driver, new Horde_Kolab_Storage_Folder_Types(), new Horde_Kolab_Storage_List_Query_List_Defaults_Bail());
     $list->setCache($cache);
     $list->setDefault(array('folder' => 'INBOX/Foo', 'namespace' => 'personal', 'type' => 'event'), 'INBOX/Bar');
 }