Example #1
0
 /**
  * validate getFolders for IPhones
  */
 public function testGetFoldersIPhone()
 {
     // create at least one folder with sync grants
     $syncAbleFolder = $this->_getContainerWithSyncGrant();
     $controller = $this->_getController($this->_getDevice(Syncope_Model_Device::TYPE_IPHONE));
     $folders = $controller->getAllFolders();
     foreach ($folders as $folder) {
         $this->assertTrue($this->_testUser->hasGrant($folder['folderId'], Tinebase_Model_Grants::GRANT_SYNC));
     }
     $this->assertArrayNotHasKey($this->_specialFolderName, $folders, "key {$this->_specialFolderName} found in " . print_r($folders, true));
     $this->assertGreaterThanOrEqual(1, count($folders));
 }