Skip to content

Commit

Permalink
Add test for restricting fields returned from the syncCache query.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk committed Oct 16, 2013
1 parent 8cded7f commit b489d91
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
8 changes: 8 additions & 0 deletions framework/ActiveSync/test/Horde/ActiveSync/StateTest/Base.php
Expand Up @@ -154,6 +154,14 @@ protected function _testCacheFolders()
$cache->save();
}

protected function _testCacheDataRestrictFields()
{
$cache_data = self::$state->getSyncCache('dev123', 'mike', array('folders'));
$this->assertCount(1, $cache_data);
list($key, $value) = each($cache_data);
$this->assertEquals('folders', $key);
}

protected function _testCacheFoldersPersistence()
{
$cache = new Horde_ActiveSync_SyncCache(self::$state, 'dev123', 'mike', self::$logger->getLogger());
Expand Down
Expand Up @@ -71,6 +71,14 @@ public function testCacheFolders()
$this->_testCacheFolders();
}

/**
* @depends testCacheFolders
*/
public function testCacheDataRestrictFields()
{
$this->_testCacheDataRestrictFields();
}

/**
* @depends testCacheFolders
*/
Expand Down
Expand Up @@ -33,6 +33,14 @@ public function testCacheFolders()
$this->_testCacheFolders();
}

/**
* @depends testCacheFolders
*/
public function testCacheDataRestrictFields()
{
$this->_testCacheDataRestrictFields();
}

/**
* @depends testCacheFolders
*/
Expand Down

0 comments on commit b489d91

Please sign in to comment.