/**
  * test sync with non existing collection id
  */
 public function testCreateDevice()
 {
     $newDevice = ActiveSync_Backend_DeviceTests::getTestDevice();
     $device = $this->_deviceBackend->create($newDevice);
     #var_dump($device);
     return $device;
 }
 /**
  * (non-PHPdoc)
  * @see ActiveSync/ActiveSync_TestCase::setUp()
  */
 protected function setUp()
 {
     Tinebase_TransactionManager::getInstance()->startTransaction(Tinebase_Core::getDb());
     Syncope_Registry::setDatabase(Tinebase_Core::getDb());
     Syncope_Registry::setTransactionManager(Tinebase_TransactionManager::getInstance());
     $this->_deviceBackend = new Syncope_Backend_Device(Tinebase_Core::getDb(), SQL_TABLE_PREFIX . 'acsync_');
     $this->_folderBackend = new Syncope_Backend_Folder(Tinebase_Core::getDb(), SQL_TABLE_PREFIX . 'acsync_');
     $this->_syncStateBackend = new Syncope_Backend_SyncState(Tinebase_Core::getDb(), SQL_TABLE_PREFIX . 'acsync_');
     $this->_contentStateBackend = new Syncope_Backend_Content(Tinebase_Core::getDb(), SQL_TABLE_PREFIX . 'acsync_');
     $this->_device = $this->_deviceBackend->create(ActiveSync_Backend_DeviceTests::getTestDevice());
     Syncope_Registry::set('deviceBackend', $this->_deviceBackend);
     Syncope_Registry::set('folderStateBackend', $this->_folderBackend);
     Syncope_Registry::set('syncStateBackend', $this->_syncStateBackend);
     Syncope_Registry::set('contentStateBackend', $this->_contentStateBackend);
     Syncope_Registry::set('loggerBackend', Tinebase_Core::getLogger());
     Syncope_Registry::setContactsDataClass('ActiveSync_Controller_Contacts');
     Syncope_Registry::setCalendarDataClass('ActiveSync_Controller_Calendar');
     Syncope_Registry::setEmailDataClass('ActiveSync_Controller_Email');
     Syncope_Registry::setTasksDataClass('ActiveSync_Controller_Tasks');
 }
Example #3
0
 /**
  * store device information
  * 
  * @param ActiveSync_Model_Device $_device
  * @return ActiveSync_Model_Device
  */
 public function createDevice(ActiveSync_Model_Device $_device)
 {
     $device = $this->_deviceBackend->create($_device);
     return $device;
 }