public function testGetRelationshipsWithCustomFields() { $employee = new Employee(); $web_service_util = new SugarWebServiceUtilv4(); $result = $web_service_util->get_data_list($employee); //$total = $GLOBALS['db']->getOne("SELECT count(id) AS total FROM users WHERE portal_only=0 AND deleted=0"); $this->assertArrayHasKey('list', $result, 'Assert that we have a list of results and that the get_data_list query on Employees does not cause an error'); }
public function testGetRelationshipsWithCustomFields() { $web_service_util = new SugarWebServiceUtilv4(); $result = $web_service_util->getRelationshipResults($this->_contact, 'accounts', array('id', 'name', 'test_custom_c')); $this->assertTrue(isset($result['rows'][0])); $this->assertTrue(isset($result['rows'][0]['test_custom_c'])); $this->assertEquals($result['rows'][0]['test_custom_c'], 'Custom Field'); }