2 /*********************************************************************************
3 * SugarCRM Community Edition is a customer relationship management program developed by
4 * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
6 * This program is free software; you can redistribute it and/or modify it under
7 * the terms of the GNU Affero General Public License version 3 as published by the
8 * Free Software Foundation with the addition of the following permission added
9 * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
10 * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
11 * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
13 * This program is distributed in the hope that it will be useful, but WITHOUT
14 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15 * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
18 * You should have received a copy of the GNU Affero General Public License along with
19 * this program; if not, see http://www.gnu.org/licenses or write to the Free
20 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
23 * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
24 * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
26 * The interactive user interfaces in modified source and object code versions
27 * of this program must display Appropriate Legal Notices, as required under
28 * Section 5 of the GNU Affero General Public License version 3.
30 * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
31 * these Appropriate Legal Notices must retain the display of the "Powered by
32 * SugarCRM" logo. If the display of the logo is not reasonably feasible for
33 * technical reasons, the Appropriate Legal Notices must display the words
34 * "Powered by SugarCRM".
35 ********************************************************************************/
38 require_once('tests/SugarTestViewConvertLeadUtilities.php');
39 require_once 'modules/Leads/views/view.convertlead.php';
40 require_once 'tests/SugarTestViewConvertLeadUtilities.php';
43 class ConvertLeadTest extends Sugar_PHPUnit_Framework_TestCase
48 protected $license_expires_in = null;
50 public function setUp()
52 SugarTestHelper::setUp('beanFiles');
53 SugarTestHelper::setUp('beanList');
54 SugarTestHelper::setUp('app_list_strings');
55 SugarTestHelper::setUp('mod_strings', array('Leads'));
56 SugarTestHelper::setUp('current_user');
57 if (isset($_SESSION['LICENSE_EXPIRES_IN']))
59 $this->license_expires_in = $_SESSION['LICENSE_EXPIRES_IN'];
61 $_SESSION['LICENSE_EXPIRES_IN'] = '5';
64 public function tearDown()
66 $_SESSION['LICENSE_EXPIRES_IN'] = $this->license_expires_in;
67 SugarTestHelper::tearDown();
73 public function testOpportunityNameValueFilled()
75 $lead = SugarTestLeadUtilities::createLead();
76 $lead->opportunity_name = 'SBizzle Dollar Store';
79 $_REQUEST['module'] = 'Leads';
80 $_REQUEST['action'] = 'ConvertLead';
81 $_REQUEST['record'] = $lead->id;
83 // Check that the opportunity name doesn't get populated when it's not in the Leads editview layout
84 require_once('include/MVC/Controller/ControllerFactory.php');
85 require_once('include/MVC/View/ViewFactory.php');
86 $GLOBALS['app']->controller = ControllerFactory::getController($_REQUEST['module']);
88 $GLOBALS['app']->controller->execute();
89 $output = ob_get_clean();
91 $matches_one = array();
92 $pattern = '/SBizzle Dollar Store/';
93 preg_match($pattern, $output, $matches_one);
94 $this->assertTrue(count($matches_one) == 0, "Opportunity name got carried over to the Convert Leads page when it shouldn't have.");
96 // Add the opportunity_name to the Leads EditView
97 SugarTestStudioUtilities::addFieldToLayout('Leads', 'editview', 'opportunity_name');
99 // Check that the opportunity name now DOES get populated now that it's in the Leads editview layout
101 $GLOBALS['app']->controller = ControllerFactory::getController($_REQUEST['module']);
102 $GLOBALS['app']->controller->execute();
103 $output = ob_get_clean();
104 $matches_two = array();
105 $pattern = '/SBizzle Dollar Store/';
106 preg_match($pattern, $output, $matches_two);
107 $this->assertTrue(count($matches_two) > 0, "Opportunity name did not carry over to the Convert Leads page when it should have.");
109 SugarTestStudioUtilities::removeAllCreatedFields();
110 unset($GLOBALS['app']->controller);
111 unset($_REQUEST['module']);
112 unset($_REQUEST['action']);
113 unset($_REQUEST['record']);
114 SugarTestLeadUtilities::removeAllCreatedLeads();
120 public function testActivityMove() {
122 $lead = SugarTestLeadUtilities::createLead();
123 $contact = SugarTestContactUtilities::createContact();
124 $meeting = SugarTestMeetingUtilities::createMeeting();
125 SugarTestMeetingUtilities::addMeetingParent($meeting->id, $lead->id);
126 $relation_id = SugarTestMeetingUtilities::addMeetingLeadRelation($meeting->id, $lead->id);
127 $_REQUEST['record'] = $lead->id;
129 // refresh the meeting to include parent_id and parent_type
130 $meeting_id = $meeting->id;
131 $meeting = new Meeting();
132 $meeting->retrieve($meeting_id);
134 // action: move meeting from lead to contact
135 $convertObj = new TestViewConvertLead();
136 $convertObj->moveActivityWrapper($meeting, $contact);
138 // verification 1, parent id should be contact id
139 $this->assertTrue($meeting->parent_id == $contact->id, 'Meeting parent id is not converted to contact id.');
141 // verification 2, parent type should be "Contacts"
142 $this->assertTrue($meeting->parent_type == 'Contacts', 'Meeting parent type is not converted to Contacts.');
144 // verification 3, record should be deleted from meetings_leads table
145 $sql = "select id from meetings_leads where meeting_id='{$meeting->id}' and lead_id='{$lead->id}' and deleted=0";
146 $result = $GLOBALS['db']->query($sql);
147 $row = $GLOBALS['db']->fetchByAssoc($result);
148 $this->assertFalse($row, "Meeting-Lead relationship is not removed.");
150 // verification 4, record should be added to meetings_contacts table
151 $sql = "select id from meetings_contacts where meeting_id='{$meeting->id}' and contact_id='{$contact->id}' and deleted=0";
152 $result = $GLOBALS['db']->query($sql);
153 $row = $GLOBALS['db']->fetchByAssoc($result);
154 $this->assertFalse(empty($row), "Meeting-Contact relationship is not added.");
157 unset($_REQUEST['record']);
158 $GLOBALS['db']->query("delete from meetings_contacts where meeting_id='{$meeting->id}' and contact_id= '{$contact->id}'");
159 SugarTestMeetingUtilities::deleteMeetingLeadRelation($relation_id);
160 SugarTestMeetingUtilities::removeMeetingContacts();
161 SugarTestMeetingUtilities::removeAllCreatedMeetings();
162 SugarTestContactUtilities::removeAllCreatedContacts();
163 SugarTestLeadUtilities::removeAllCreatedLeads();
167 public function testActivityCopyWithParent() {
168 // lets the run the activity copy again, only this time we pass in a parent account
169 $lead = SugarTestLeadUtilities::createLead();
170 $contact = SugarTestContactUtilities::createContact();
171 $meeting = SugarTestMeetingUtilities::createMeeting();
172 $account = SugarTestAccountUtilities::createAccount();
173 SugarTestMeetingUtilities::addMeetingParent($meeting->id, $lead->id);
174 $relation_id = SugarTestMeetingUtilities::addMeetingLeadRelation($meeting->id, $lead->id);
175 $_REQUEST['record'] = $lead->id;
177 // refresh the meeting to include parent_id and parent_type
178 $meeting_id = $meeting->id;
179 $meeting = new Meeting();
180 $meeting->retrieve($meeting_id);
182 // action: copy meeting from lead to contact
183 $convertObj = new TestViewConvertLead();
184 $convertObj->copyActivityWrapper($meeting, $contact, array('id'=>$account->id,'type'=>'Accounts'));
187 // 2a a newly created meeting with no parent info passed in, so parent id and type are empty
188 //parent type=Contatcs and parent_id=$contact->id
189 //$sql = "select id from meetings where parent_id='{$contact->id}' and parent_type= 'Contacts' and deleted=0";
190 $sql = "select id, parent_id from meetings where name = '{$meeting->name}'";
191 $result = $GLOBALS['db']->query($sql);
192 while ($row = $GLOBALS['db']->fetchByAssoc($result)){
193 //skip if this is the original message
194 if($row['id'] == $meeting_id){
198 $this->assertEquals($row['parent_id'], $account->id, 'parent id of meeting should be equal to passed in account id: '.$account->id);
204 public function testActivityCopyWithNoParent() {
206 $lead = SugarTestLeadUtilities::createLead();
207 $contact = SugarTestContactUtilities::createContact();
208 $meeting = SugarTestMeetingUtilities::createMeeting();
209 SugarTestMeetingUtilities::addMeetingParent($meeting->id, $lead->id);
210 $relation_id = SugarTestMeetingUtilities::addMeetingLeadRelation($meeting->id, $lead->id);
211 $_REQUEST['record'] = $lead->id;
213 // refresh the meeting to include parent_id and parent_type
214 $meeting_id = $meeting->id;
215 $meeting = new Meeting();
216 $meeting->retrieve($meeting_id);
218 // action: copy meeting from lead to contact
219 $convertObj = new TestViewConvertLead();
220 $convertObj->copyActivityWrapper($meeting, $contact);
222 // 1. the original meeting should still have the same parent_type and parent_id
223 $meeting->retrieve($meeting_id);
224 $this->assertEquals('Leads', $meeting->parent_type, 'parent_type of the original meeting was changed from Leads to '.$meeting->parent_type);
225 $this->assertEquals($lead->id, $meeting->parent_id, 'parent_id of the original meeting was changed from '.$lead->id.' to '.$meeting->parent_id);
227 // 2. a newly created meeting with no parent info passed in, so parent id and type are empty
228 $new_meeting_id = '';
229 $sql = "select id, parent_id from meetings where name = '{$meeting->name}'";
230 $result = $GLOBALS['db']->query($sql);
231 while ($row = $GLOBALS['db']->fetchByAssoc($result)){
232 //skip if this is the original message
233 if($row['id'] == $meeting_id){
236 $new_meeting_id = $row['id'];
237 $this->assertEmpty($row['parent_id'],'parent id of meeting should be empty as no parent was sent in ');
242 // 3. record should not be deleted from meetings_leads table
243 $sql = "select id from meetings_leads where meeting_id='{$meeting->id}' and lead_id='{$lead->id}' and deleted=0";
244 $result = $GLOBALS['db']->query($sql);
245 $row = $GLOBALS['db']->fetchByAssoc($result);
246 $this->assertNotNull($row, "Meeting-Lead relationship was removed.");
248 // 4. new meeting record should be added to meetings_contacts table
249 $sql = "select id from meetings_contacts where meeting_id='{$new_meeting_id}' and contact_id='{$contact->id}' and deleted=0";
250 $result = $GLOBALS['db']->query($sql);
251 $row = $GLOBALS['db']->fetchByAssoc($result);
252 $this->assertFalse(empty($row), "Meeting-Contact relationship has not been added.");
255 unset($_REQUEST['record']);
256 $GLOBALS['db']->query("delete from meetings where parent_id='{$contact->id}' and parent_type= 'Contacts'");
257 $GLOBALS['db']->query("delete from meetings where parent_id='{$lead->id}' and parent_type= 'Leads'");
258 $GLOBALS['db']->query("delete from meetings_contacts where meeting_id='{$new_meeting_id}' and contact_id= '{$contact->id}'");
259 SugarTestMeetingUtilities::deleteMeetingLeadRelation($relation_id);
260 SugarTestMeetingUtilities::removeMeetingContacts();
261 SugarTestMeetingUtilities::removeAllCreatedMeetings();
262 SugarTestContactUtilities::removeAllCreatedContacts();
263 SugarTestLeadUtilities::removeAllCreatedLeads();
267 * @outputBuffering enabled
269 public function testConversionAndMoveActivities() {
270 global $sugar_config;
273 $lead = SugarTestLeadUtilities::createLead();
274 $account = SugarTestAccountUtilities::createAccount();
275 $meeting = SugarTestMeetingUtilities::createMeeting();
276 SugarTestMeetingUtilities::addMeetingParent($meeting->id, $lead->id);
277 $relation_id = SugarTestMeetingUtilities::addMeetingLeadRelation($meeting->id, $lead->id);
278 $_REQUEST['record'] = $lead->id;
280 // set the request/post parameters before converting the lead
281 $_REQUEST['module'] = 'Leads';
282 $_REQUEST['action'] = 'ConvertLead';
283 $_REQUEST['record'] = $lead->id;
284 $_REQUEST['handle'] = 'save';
285 $_REQUEST['selectedAccount'] = $account->id;
286 $sugar_config['lead_conv_activity_opt'] = 'move';
287 $_POST['lead_conv_ac_op_sel'] = 'Contacts';
289 // call display to trigger conversion
290 $vc = new ViewConvertLead();
294 $meeting_id = $meeting->id;
295 $meeting = new Meeting();
296 $meeting->retrieve($meeting_id);
299 $lead_id = $lead->id;
301 $lead->retrieve($lead_id);
303 // retrieve the new contact id from the conversion
304 $contact_id = $lead->contact_id;
306 // 1. Lead's contact_id should not be null
307 $this->assertNotNull($contact_id, 'Lead has null contact id after conversion.');
309 // 2. Lead status should be 'Converted'
310 $this->assertEquals('Converted', $lead->status, "Lead atatus should be 'Converted'.");
312 // 3. new parent_type should be Contacts
313 $this->assertEquals('Contacts', $meeting->parent_type, 'Meeting parent type has not been set to Contacts');
315 // 4. new parent_id should be contact id
316 $this->assertEquals($contact_id, $meeting->parent_id, 'Meeting parent id has not been set to contact id.');
318 // 5. record should be deleted from meetings_leads table
319 $sql = "select id from meetings_leads where meeting_id='{$meeting->id}' and lead_id='{$lead->id}' and deleted=0";
320 $result = $GLOBALS['db']->query($sql);
321 $row = $GLOBALS['db']->fetchByAssoc($result);
322 $this->assertFalse($row, "Meeting-Lead relationship is not removed.");
324 // 6. record should be added to meetings_contacts table
325 $sql = "select id from meetings_contacts where meeting_id='{$meeting->id}' and contact_id='{$contact_id}' and deleted=0";
326 $result = $GLOBALS['db']->query($sql);
327 $row = $GLOBALS['db']->fetchByAssoc($result);
328 $this->assertFalse(empty($row), "Meeting-Contact relationship is not added.");
331 unset($_REQUEST['record']);
332 $GLOBALS['db']->query("delete from meetings where parent_id='{$lead->id}' and parent_type= 'Leads'");
333 $GLOBALS['db']->query("delete from meetings where parent_id='{$contact_id}' and parent_type= 'Contacts'");
334 $GLOBALS['db']->query("delete from contacts where id='{$contact_id}'");
335 $GLOBALS['db']->query("delete from meetings_contacts where meeting_id='{$meeting->id}' and contact_id= '{$contact_id}'");
336 SugarTestMeetingUtilities::deleteMeetingLeadRelation($relation_id);
337 SugarTestMeetingUtilities::removeMeetingContacts();
338 SugarTestMeetingUtilities::removeAllCreatedMeetings();
339 SugarTestAccountUtilities::removeAllCreatedAccounts();
340 SugarTestLeadUtilities::removeAllCreatedLeads();
344 * @outputBuffering enabled
346 public function testConversionAndCopyActivities() {
347 global $sugar_config;
350 $lead = SugarTestLeadUtilities::createLead();
351 $account = SugarTestAccountUtilities::createAccount();
352 $meeting = SugarTestMeetingUtilities::createMeeting();
353 SugarTestMeetingUtilities::addMeetingParent($meeting->id, $lead->id);
354 $relation_id = SugarTestMeetingUtilities::addMeetingLeadRelation($meeting->id, $lead->id);
355 $_REQUEST['record'] = $lead->id;
357 // set the request/post parameters before converting the lead
358 $_REQUEST['module'] = 'Leads';
359 $_REQUEST['action'] = 'ConvertLead';
360 $_REQUEST['record'] = $lead->id;
361 $_REQUEST['handle'] = 'save';
362 $_REQUEST['selectedAccount'] = $account->id;
363 $sugar_config['lead_conv_activity_opt'] = 'copy';
364 $_POST['lead_conv_ac_op_sel'] = array('Contacts');
366 // call display to trigger conversion
367 $vc = new ViewConvertLead();
371 $meeting_id = $meeting->id;
372 $meeting = new Meeting();
373 $meeting->retrieve($meeting_id);
376 $lead_id = $lead->id;
378 $lead->retrieve($lead_id);
380 // retrieve the new contact id from the conversion
381 $contact_id = $lead->contact_id;
383 // 1. Lead's contact_id should not be null
384 $this->assertNotNull($contact_id, 'Lead has null contact id after conversion.');
386 // 2. Lead status should be 'Converted'
387 $this->assertEquals('Converted', $lead->status, "Lead atatus should be 'Converted'.");
389 // 3. parent_type of the original meeting should be Leads
390 $this->assertEquals('Leads', $meeting->parent_type, 'Meeting parent should be Leads');
392 // 4. parent_id of the original meeting should be contact id
393 $this->assertEquals($lead_id, $meeting->parent_id, 'Meeting parent id should be lead id.');
395 // 5. record should NOT be deleted from meetings_leads table
396 $sql = "select id from meetings_leads where meeting_id='{$meeting->id}' and lead_id='{$lead->id}' and deleted=0";
397 $result = $GLOBALS['db']->query($sql);
398 $row = $GLOBALS['db']->fetchByAssoc($result);
399 $this->assertFalse(empty($row), "Meeting-Lead relationship is removed.");
401 // 6. record should be added to meetings_contacts table
402 $sql = "select meeting_id from meetings_contacts where contact_id='{$contact_id}' and deleted=0";
403 $result = $GLOBALS['db']->query($sql);
404 $row = $GLOBALS['db']->fetchByAssoc($result);
405 $this->assertFalse(empty($row), "Meeting-Contact relationship is not added.");
407 // 7. the parent_type of the new meeting should be empty
408 $new_meeting_id = $row['meeting_id'];
409 $sql = "select id, parent_type, parent_id from meetings where id='{$new_meeting_id}' and deleted=0";
410 $result = $GLOBALS['db']->query($sql);
411 $row = $GLOBALS['db']->fetchByAssoc($result);
412 $this->assertFalse(empty($row), "New meeting is not added for contact.");
413 $this->assertEmpty($row['parent_type'], 'Parent type of the new meeting should be Empty');
415 // 8. the parent_id of the new meeting should be contact id
416 $this->assertEmpty($row['parent_id'], 'Parent id of the new meeting should be empty.');
419 unset($_REQUEST['record']);
420 $GLOBALS['db']->query("delete from meetings where parent_id='{$lead->id}' and parent_type= 'Leads'");
421 $GLOBALS['db']->query("delete from meetings where parent_id='{$contact_id}' and parent_type= 'Contacts'");
422 $GLOBALS['db']->query("delete from contacts where id='{$contact_id}'");
423 $GLOBALS['db']->query("delete from meetings_leads where meeting_id='{$meeting->id}' and lead_id= '{$lead_id}'");
424 $GLOBALS['db']->query("delete from meetings_contacts where contact_id= '{$contact_id}'");
425 SugarTestMeetingUtilities::deleteMeetingLeadRelation($relation_id);
426 SugarTestMeetingUtilities::removeMeetingContacts();
427 SugarTestMeetingUtilities::removeAllCreatedMeetings();
428 SugarTestAccountUtilities::removeAllCreatedAccounts();
429 SugarTestLeadUtilities::removeAllCreatedLeads();
433 * @outputBuffering enabled
435 public function testConversionAndDoNothing() {
436 global $sugar_config;
439 $lead = SugarTestLeadUtilities::createLead();
440 $account = SugarTestAccountUtilities::createAccount();
441 $meeting = SugarTestMeetingUtilities::createMeeting();
442 SugarTestMeetingUtilities::addMeetingParent($meeting->id, $lead->id);
443 $relation_id = SugarTestMeetingUtilities::addMeetingLeadRelation($meeting->id, $lead->id);
444 $_REQUEST['record'] = $lead->id;
446 // set the request/post parameters before converting the lead
447 $_REQUEST['module'] = 'Leads';
448 $_REQUEST['action'] = 'ConvertLead';
449 $_REQUEST['record'] = $lead->id;
450 $_REQUEST['handle'] = 'save';
451 $_REQUEST['selectedAccount'] = $account->id;
452 $sugar_config['lead_conv_activity_opt'] = 'none';
454 // call display to trigger conversion
455 $vc = new ViewConvertLead();
459 $meeting_id = $meeting->id;
460 $meeting = new Meeting();
461 $meeting->retrieve($meeting_id);
464 $lead_id = $lead->id;
466 $lead->retrieve($lead_id);
468 // retrieve the new contact id from the conversion
469 $contact_id = $lead->contact_id;
471 // 1. Lead's contact_id should not be null
472 $this->assertNotNull($contact_id, 'Lead has null contact id after conversion.');
474 // 2. Lead status should be 'Converted'
475 $this->assertEquals('Converted', $lead->status, "Lead atatus should be 'Converted'.");
477 // 3. parent_type of the original meeting should be Leads
478 $this->assertEquals('Leads', $meeting->parent_type, 'Meeting parent should be Leads');
480 // 4. parent_id of the original meeting should be contact id
481 $this->assertEquals($lead_id, $meeting->parent_id, 'Meeting parent id should be lead id.');
483 // 5. record should NOT be deleted from meetings_leads table
484 $sql = "select id from meetings_leads where meeting_id='{$meeting->id}' and lead_id='{$lead->id}' and deleted=0";
485 $result = $GLOBALS['db']->query($sql);
486 $row = $GLOBALS['db']->fetchByAssoc($result);
487 $this->assertFalse(empty($row), "Meeting-Lead relationship is removed.");
489 // 6. record should NOT be added to meetings_contacts table
490 $sql = "select meeting_id from meetings_contacts where contact_id='{$contact_id}' and deleted=0";
491 $result = $GLOBALS['db']->query($sql);
492 $row = $GLOBALS['db']->fetchByAssoc($result);
493 $this->assertFalse($row, "Meeting-Contact relationship should not be added.");
496 unset($_REQUEST['record']);
497 $GLOBALS['db']->query("delete from meetings where parent_id='{$lead->id}' and parent_type= 'Leads'");
498 $GLOBALS['db']->query("delete from meetings where parent_id='{$contact_id}' and parent_type= 'Contacts'");
499 $GLOBALS['db']->query("delete from contacts where id='{$contact_id}'");
500 $GLOBALS['db']->query("delete from meetings_leads where meeting_id='{$meeting->id}' and lead_id= '{$lead_id}'");
501 $GLOBALS['db']->query("delete from meetings_contacts where contact_id= '{$contact_id}'");
502 SugarTestMeetingUtilities::deleteMeetingLeadRelation($relation_id);
503 SugarTestMeetingUtilities::removeMeetingContacts();
504 SugarTestMeetingUtilities::removeAllCreatedMeetings();
505 SugarTestAccountUtilities::removeAllCreatedAccounts();
506 SugarTestLeadUtilities::removeAllCreatedLeads();
509 public function testMeetingsUsersRelationships()
511 global $current_user;
513 $bean = SugarTestMeetingUtilities::createMeeting();
514 $convert_lead = SugarTestViewConvertLeadUtilities::createViewConvertLead();
516 if ($bean->object_name == "Meeting")
518 $convert_lead->setMeetingsUsersRelationship($bean);
521 $this->assertTrue(is_object($bean->users), "Relationship wasn't set.");
523 SugarTestMeetingUtilities::removeMeetingUsers();
524 SugarTestMeetingUtilities::removeAllCreatedMeetings();
528 class TestViewConvertLead extends ViewConvertLead
530 public function moveActivityWrapper($activity, $bean) {
531 parent::moveActivity($activity, $bean);
534 public function copyActivityWrapper($activity, $bean,$parent=array()) {
535 parent::copyActivityAndRelateToBean($activity, $bean,$parent);
538 public function testMeetingsUsersRelationships()
540 global $current_user;
542 $bean = SugarTestMeetingUtilities::createMeeting();
543 $convert_lead = SugarTestViewConvertLeadUtilities::createViewConvertLead();
545 if ($bean->object_name == "Meeting")
547 $convert_lead->setMeetingsUsersRelationship($bean);
550 $this->assertTrue(is_object($bean->users), "Relationship wasn't set.");
552 SugarTestMeetingUtilities::removeMeetingUsers();
553 SugarTestMeetingUtilities::removeAllCreatedMeetings();