validateCollectionsFromCache() public method

Validate the collections from the cache and fill in any missing values from the folder cache.
public validateCollectionsFromCache ( array &$collections )
$collections array A reference to an array of collections.
Beispiel #1
0
 /**
  * Validates the collection data from the syncCache, filling in missing
  * values from the folder cache.
  */
 public function validateFromCache()
 {
     $this->_cache->validateCollectionsFromCache($this->_collections);
 }
Beispiel #2
0
 protected function _testCollectionsFromCache()
 {
     $cache = new Horde_ActiveSync_SyncCache(self::$state, 'dev123', 'mike', self::$logger->getLogger());
     $collections = array('519422f1-4c5c-4547-946a-1701c0a8015f' => array('id' => '519422f1-4c5c-4547-946a-1701c0a8015f'));
     $expected = array('519422f1-4c5c-4547-946a-1701c0a8015f' => array('class' => 'Email', 'windowsize' => 5, 'truncation' => 0, 'mimesupport' => 0, 'mimetruncation' => 8, 'bodyprefs' => array('wanted' => 2, 2 => array('type' => 2, 'truncationsize' => 200000)), 'filtertype' => 5, 'id' => '519422f1-4c5c-4547-946a-1701c0a8015f', 'serverid' => 'INBOX', 'type' => 2));
     $cache->validateCollectionsFromCache($collections);
     $this->assertEquals($expected, $collections);
 }