Esempio n. 1
0
 public function testGetUserDevice()
 {
     $device = $this->testCreateDevice();
     $userDevice = $this->_deviceBackend->getUserDevice('1234', 'iphone-abcd');
     $this->assertEquals($device->id, $userDevice->id);
     $this->setExpectedException('Syncope_Exception_NotFound');
     $userDevice = $this->_deviceBackend->getUserDevice('1234', 'iphone-xyz');
 }
Esempio n. 2
0
 /**
  * (non-PHPdoc)
  * @see ActiveSync/ActiveSync_TestCase::setUp()
  */
 protected function setUp()
 {
     $this->_db = getTestDatabase();
     $this->_db->beginTransaction();
     $this->_deviceBackend = new Syncope_Backend_Device($this->_db);
     $this->_folderBackend = new Syncope_Backend_Folder($this->_db);
     $newDevice = Syncope_Backend_DeviceTests::getTestDevice();
     $this->_device = $this->_deviceBackend->create($newDevice);
 }
Esempio n. 3
0
 /**
  * (non-PHPdoc)
  * @see ActiveSync/ActiveSync_TestCase::setUp()
  */
 protected function setUp()
 {
     $this->_db = getTestDatabase();
     $this->_db->beginTransaction();
     $this->_contentBackend = new Syncope_Backend_Content($this->_db);
     $this->_deviceBackend = new Syncope_Backend_Device($this->_db);
     $this->_folderBackend = new Syncope_Backend_Folder($this->_db);
     $this->_syncStateBackend = new Syncope_Backend_SyncState($this->_db);
     $this->_device = $this->_deviceBackend->create(Syncope_Backend_DeviceTests::getTestDevice());
     $this->_folder = $this->_folderBackend->create(Syncope_Backend_FolderTests::getTestFolder($this->_device));
 }