tags * */ class Bug47683Test extends SOAPTestCase { public $_contact = null; public $_sessionId = ''; /** * Create test user * */ public function setUp() { $this->_soapURL = $GLOBALS['sugar_config']['site_url'].'/soap.php'; parent::setUp(); $beanList = array(); $beanFiles = array(); require('include/modules.php'); $GLOBALS['beanList'] = $beanList; $GLOBALS['beanFiles'] = $beanFiles; $this->_setupTestContact(); } /** * Remove anything that was used during this test * */ public function tearDown() { parent::tearDown(); SugarTestUserUtilities::removeAllCreatedAnonymousUsers(); SugarTestContactUtilities::removeAllCreatedContacts(); SugarTestContactUtilities::removeCreatedContactsUsersRelationships(); $this->_contact = null; SugarTestMeetingUtilities::removeMeetingContacts(); unset($GLOBALS['beanList']); unset($GLOBALS['beanFiles']); } public function testGetModifiedEntriesWithCDATA() { $this->_login(); $ids = array($this->_contact->id); $result = $this->_soapClient->call('get_modified_entries', array('session' => $this->_sessionId, 'module_name' => 'Contacts', 'ids' => $ids, 'select_fields' => array())); $decoded = base64_decode($result['result']); // ensure value tags are using CDATA $this->assertTrue(strpos($decoded, '_contact = SugarTestContactUtilities::createContact(); $this->_contact->contacts_users_id = $this->_user->id; $this->_contact->save(); } }