*/
public function synchronize()
{
+ //@todo Do not fetch the folder types in case the folder list did not change.
$this->_list_cache->store(
$this->_list->listFolders(),
$this->_list->listFolderTypes()
*/
public function getQuery($name)
{
- $this->_list->getQuery($name);
+ return $this->_list->getQuery($name);
}
}
\ No newline at end of file
*/
public function getQuery($name)
{
- $this->_list->getQuery($name);
+ return $this->_list->getQuery($name);
}
}
\ No newline at end of file
$cache->storeListData($list->getConnectionId(), 'V', '2');
$list->listFolders();
}
+
+ public function testGetQuery()
+ {
+ $factory = new Horde_Kolab_Storage_Factory();
+ $cache = $this->getMockCache();
+ $list = new Horde_Kolab_Storage_List_Decorator_Cache(
+ $this->getMockDriverList(),
+ new Horde_Kolab_Storage_Cache_List(
+ $cache
+ )
+ );
+ $factory->createListQuery('Base', $list);
+ $this->assertInstanceOf(
+ 'Horde_Kolab_Storage_Query',
+ $list->getQuery('Base')
+ );
+ }
}
$list->listFolderTypes();
$this->assertLogContains('List for test@example.com@mock:0 contained 4 folders and annotations.');
}
+
+ public function testGetQuery()
+ {
+ $factory = new Horde_Kolab_Storage_Factory();
+ $list = new Horde_Kolab_Storage_List_Decorator_Log(
+ $this->getNullList($factory),
+ $this->getMockLogger()
+ );
+ $factory->createListQuery('Base', $list);
+ $this->assertInstanceOf(
+ 'Horde_Kolab_Storage_Query',
+ $list->getQuery('Base')
+ );
+ }
}