protected function _testPartialSyncWithUnchangedCollections()
{
// Pretend the heartbeat was not sent by the client.
$cache = new Horde_ActiveSync_SyncCache(self::$state, 'dev123', 'mike', self::$logger->getLogger());
$cache->hbinterval = false;
$cache->wait = false;
$cache->save();
$collections = $this->getCollectionHandler();
$collections->loadCollectionsFromCache();
// Should return false because we haven't loaded (from incoming xml) any
// collections yet, so no collections in handler are syncable.
$this->assertEquals(false, $collections->initPartialSync());
// Pretent to read a new collection in from xml.
// This one is identical to what we already have, so this should also
// fail.
$col = array('id' => '519422f1-4c5c-4547-946a-1701c0a8015f', 'windowsize' => 5, 'truncation' => 0, 'mimesupport' => 0, 'mimetruncation' => 8, 'conflict' => 1, 'bodyprefs' => array('wanted' => 2, 2 => array('type' => 2, 'truncationsize' => 200000)), 'synckey' => '{517541cc-b188-478d-9e1a-fa49c0a8015f}3', 'deletesasmoves' => 1, 'filtertype' => 5);
$collections->addCollection($col);
$this->assertEquals(false, $collections->initPartialSync());
// Change the filtertype to simulate a new filtertype request from client.
// This should now return true.
$col['filtertype'] = 6;
$collections->addCollection($col);
$this->assertEquals(true, $collections->initPartialSync());
}