/** * test update of snom phone settings * */ public function testUpdateSnomPhoneSettings() { $test = $this->getSnomPhoneSettings(); $returned = $this->_json->getSnomPhoneSettings($test['phone_id']); $returned['web_language'] = 'Deutsch'; $updated = $this->_json->saveSnomPhoneSettings($returned); $this->assertEquals($returned['web_language'], $updated['web_language']); $this->assertNotNull($updated['phone_id']); // delete everything $settingsPhone = $this->_json->getSnomPhone($test['phone_id']); $location_id = $settingsPhone['location_id']['value']; $template_id = $settingsPhone['template_id']['value']; $phoneTemplate = $this->_json->getSnomTemplate($template_id); $settings_id = $phoneTemplate['setting_id']['value']; $software_id = $phoneTemplate['software_id']['value']; $this->_json->deleteSnomPhoneSettings(array($returned['phone_id'])); $this->_json->deleteSnomPhones(array($settingsPhone['id'])); $this->_json->deleteSnomTemplates(array($template_id)); $this->_json->deleteSnomLocations(array($location_id)); $this->_json->deleteSnomSettings(array($settings_id)); $this->_json->deleteSnomSoftwares(array($software_id)); }