status = 'Active'; $GLOBALS['current_user']->is_admin = 1; $GLOBALS['current_user']->save(); $this->useOutputBuffering = false; } public function tearDown() { SugarTestUserUtilities::removeAllCreatedAnonymousUsers(); unset($GLOBALS['current_user']); unset($GLOBALS['beanFiles']); unset($GLOBALS['beanList']); } 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'); } }