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 testGetModifiedEntries() { $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']); $this->assertContains("{$this->_contact->first_name}", $decoded, "First name not found in data"); $this->assertContains("{$this->_contact->last_name}", $decoded, "Last name not found in data"); } /********************************** * HELPER PUBLIC FUNCTIONS **********************************/ private function _setupTestContact() { $this->_contact = SugarTestContactUtilities::createContact(); $this->_contact->last_name .= " Пупкин-Васильев"; // test special chars $this->_contact->description = "<==>"; //$this->_contact->contacts_users_id = $this->_user->id; $this->_contact->save(); } }