* This method is called after a test is executed. * * @access protected */ protected function tearDown() { ActiveSync_Controller_Device::getInstance()->delete($this->objects['device']); $filterBackend = new Tinebase_PersistentFilter_Backend_Sql(); $filterBackend->delete($this->objects['filter']->getId()); } /** * test get device */ public function testGetDevice() { $device = ActiveSync_Controller_Device::getInstance()->get($this->objects['device']->getId()); $this->assertEquals($device->id, $this->objects['device']->id); } /** * test setting content filter */ public function testSetDeviceContentFilter() { ActiveSync_Controller_Device::getInstance()->setDeviceContentFilter($this->objects['device']->getId(), ActiveSync_Controller::CLASS_CONTACTS, $this->objects['filter']->getId()); $device = ActiveSync_Controller_Device::getInstance()->get($this->objects['device']->getId()); $this->assertEquals($device->contactsfilter_id, $this->objects['filter']->getId()); } } if (PHPUnit_MAIN_METHOD == 'ActiveSync_Controller_Device::main') { ActiveSync_Controller_Device::main(); }