updateAfterDeleteFolder() 공개 메소드

Update the listener after deleting folder.
public updateAfterDeleteFolder ( string $folder ) : null
$folder string The path of the folder that has been deleted.
리턴 null
예제 #1
0
파일: Cache.php 프로젝트: jubinpatel/horde
 /**
  * Update the listener after deleting folder.
  *
  * @param string $folder The path of the folder that has been deleted.
  *
  * @return NULL
  */
 public function updateAfterDeleteFolder($folder)
 {
     $this->_sync->updateAfterDeleteFolder($folder);
 }
예제 #2
0
 public function testUpdateAfterDeleteFolder()
 {
     $namespace = new Horde_Kolab_Storage_Folder_Namespace_Fixed('test');
     $driver = $this->getMock('Horde_Kolab_Storage_Driver');
     $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' => 'contact', 'INBOX/Bar' => 'note')));
     $cache->expects($this->once())->method('store')->with(array('INBOX/Foo'), array('INBOX/Foo' => 'contact'));
     $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->updateAfterDeleteFolder('INBOX/Bar');
 }