2 /*********************************************************************************
3 * SugarCRM Community Edition is a customer relationship management program developed by
4 * SugarCRM, Inc. Copyright (C) 2004-2012 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 'include/ListView/ListViewDisplay.php';
40 class ListViewDisplayTest extends Sugar_PHPUnit_Framework_TestCase
42 public function setUp()
44 $this->_lvd = new ListViewDisplayMock();
45 $GLOBALS['current_user'] = SugarTestUserUtilities::createAnonymousUser();
46 $GLOBALS['app_strings'] = return_application_language($GLOBALS['current_language']);
49 public function tearDown()
51 SugarTestUserUtilities::removeAllCreatedAnonymousUsers();
52 unset($GLOBALS['current_user']);
53 unset($GLOBALS['app_strings']);
56 public function testConstructor()
58 $this->assertInstanceOf('ListViewData',$this->_lvd->lvd);
59 $this->assertInternalType('array',$this->_lvd->searchColumns);
62 public function testShouldProcessWhenConfigSaveQueryIsNotSet()
64 if ( isset($GLOBALS['sugar_config']['save_query']) ) {
65 $oldsavequery = $GLOBALS['sugar_config']['save_query'];
67 $GLOBALS['sugar_config']['save_query'] = null;
69 $this->assertTrue($this->_lvd->shouldProcess('foo'));
70 $this->assertTrue($this->_lvd->should_process);
72 if ( isset($oldsavequery) ) {
73 $GLOBALS['sugar_config']['save_query'] = $oldsavequery;
77 public function testShouldProcessWhenConfigSaveQueryIsNotPopulateOnly()
79 if ( isset($GLOBALS['sugar_config']['save_query']) ) {
80 $oldsavequery = $GLOBALS['sugar_config']['save_query'];
82 $GLOBALS['sugar_config']['save_query'] = 'populate_always';
84 $this->assertTrue($this->_lvd->shouldProcess('foo'));
85 $this->assertTrue($this->_lvd->should_process);
87 if ( isset($oldsavequery) ) {
88 $GLOBALS['sugar_config']['save_query'] = $oldsavequery;
92 public function testShouldProcessWhenGlobalDisplayListViewIsTrue()
94 if ( isset($GLOBALS['sugar_config']['save_query']) ) {
95 $oldsavequery = $GLOBALS['sugar_config']['save_query'];
97 $GLOBALS['sugar_config']['save_query'] = 'populate_only';
98 $GLOBALS['displayListView'] = true;
100 $this->assertTrue($this->_lvd->shouldProcess('foo'));
101 $this->assertTrue($this->_lvd->should_process);
103 if ( isset($oldsavequery) ) {
104 $GLOBALS['sugar_config']['save_query'] = $oldsavequery;
108 public function testShouldProcessWhenGlobalDisplayListViewIsFalseAndRequestClearQueryIsTrue()
110 if ( isset($GLOBALS['sugar_config']['save_query']) ) {
111 $oldsavequery = $GLOBALS['sugar_config']['save_query'];
113 $GLOBALS['sugar_config']['save_query'] = 'populate_only';
114 $GLOBALS['displayListView'] = false;
115 $_REQUEST['clear_query'] = true;
116 $_REQUEST['module'] = 'foo';
118 $this->assertFalse($this->_lvd->shouldProcess('foo'));
119 $this->assertFalse($this->_lvd->should_process);
121 if ( isset($oldsavequery) ) {
122 $GLOBALS['sugar_config']['save_query'] = $oldsavequery;
126 public function testShouldProcessWhenGlobalDisplayListViewIsFalseAndRequestClearQueryIsFalseAndModulesDoNotEqual()
128 if ( isset($GLOBALS['sugar_config']['save_query']) ) {
129 $oldsavequery = $GLOBALS['sugar_config']['save_query'];
131 $GLOBALS['sugar_config']['save_query'] = 'populate_only';
132 $GLOBALS['displayListView'] = false;
133 $_REQUEST['clear_query'] = false;
134 $_REQUEST['module'] = 'bar';
136 $this->assertTrue($this->_lvd->shouldProcess('foo'));
137 $this->assertTrue($this->_lvd->should_process);
139 if ( isset($oldsavequery) ) {
140 $GLOBALS['sugar_config']['save_query'] = $oldsavequery;
144 public function testShouldProcessWhenGlobalDisplayListViewIsFalseAndRequestClearQueryIsFalseAndModulesDoEqualAndQueryIsEmpty()
146 if ( isset($GLOBALS['sugar_config']['save_query']) ) {
147 $oldsavequery = $GLOBALS['sugar_config']['save_query'];
149 $GLOBALS['sugar_config']['save_query'] = 'populate_only';
150 $GLOBALS['displayListView'] = false;
151 $_REQUEST['clear_query'] = false;
152 $_REQUEST['module'] = 'foo';
153 $_REQUEST['query'] = '';
154 $_SESSION['last_search_mod'] = '';
156 $this->assertFalse($this->_lvd->shouldProcess('foo'));
157 $this->assertFalse($this->_lvd->should_process);
159 if ( isset($oldsavequery) ) {
160 $GLOBALS['sugar_config']['save_query'] = $oldsavequery;
164 public function testShouldProcessWhenGlobalDisplayListViewIsFalseAndRequestClearQueryIsFalseAndModulesDoEqualAndQueryEqualsMsi()
166 if ( isset($GLOBALS['sugar_config']['save_query']) ) {
167 $oldsavequery = $GLOBALS['sugar_config']['save_query'];
169 $GLOBALS['sugar_config']['save_query'] = 'populate_only';
170 $GLOBALS['displayListView'] = false;
171 $_REQUEST['clear_query'] = false;
172 $_REQUEST['module'] = 'foo';
173 $_REQUEST['query'] = 'MSI';
174 $_SESSION['last_search_mod'] = '';
176 $this->assertFalse($this->_lvd->shouldProcess('foo'));
177 $this->assertFalse($this->_lvd->should_process);
179 if ( isset($oldsavequery) ) {
180 $GLOBALS['sugar_config']['save_query'] = $oldsavequery;
184 public function testShouldProcessWhenGlobalDisplayListViewIsFalseAndRequestClearQueryIsFalseAndModulesDoNotEqualAndQueryDoesNotEqualsMsi()
186 if ( isset($GLOBALS['sugar_config']['save_query']) ) {
187 $oldsavequery = $GLOBALS['sugar_config']['save_query'];
189 $GLOBALS['sugar_config']['save_query'] = 'populate_only';
190 $GLOBALS['displayListView'] = false;
191 $_REQUEST['clear_query'] = false;
192 $_REQUEST['module'] = 'foo';
193 $_REQUEST['query'] = 'xMSI';
194 $_SESSION['last_search_mod'] = '';
196 $this->assertTrue($this->_lvd->shouldProcess('foo'));
197 $this->assertTrue($this->_lvd->should_process);
199 if ( isset($oldsavequery) ) {
200 $GLOBALS['sugar_config']['save_query'] = $oldsavequery;
204 public function testShouldProcessWhenGlobalDisplayListViewIsFalseAndRequestClearQueryIsFalseAndModulesDoEqualAndLastSearchModEqualsModule()
206 if ( isset($GLOBALS['sugar_config']['save_query']) ) {
207 $oldsavequery = $GLOBALS['sugar_config']['save_query'];
209 $GLOBALS['sugar_config']['save_query'] = 'populate_only';
210 $GLOBALS['displayListView'] = false;
211 $_REQUEST['clear_query'] = false;
212 $_REQUEST['module'] = 'foo';
213 $_REQUEST['query'] = '';
214 $_SESSION['last_search_mod'] = 'foo';
216 //C.L. Because of fix to 40186, the following two tests are now set to assertFalse
217 $this->assertFalse($this->_lvd->shouldProcess('foo'), 'Assert that ListViewDisplay->shouldProcess is false even if module is the same because no query was specified');
218 $this->assertFalse($this->_lvd->should_process, 'Assert that ListViewDisplay->shouldProcess class variable is false');
220 if ( isset($oldsavequery) ) {
221 $GLOBALS['sugar_config']['save_query'] = $oldsavequery;
225 public function testShouldProcessWhenGlobalDisplayListViewIsFalseAndRequestClearQueryIsFalseAndModulesDoEqualAndLastSearchModDoesNotEqualsModule()
227 if ( isset($GLOBALS['sugar_config']['save_query']) ) {
228 $oldsavequery = $GLOBALS['sugar_config']['save_query'];
230 $GLOBALS['sugar_config']['save_query'] = 'populate_only';
231 $GLOBALS['displayListView'] = false;
232 $_REQUEST['clear_query'] = false;
233 $_REQUEST['module'] = 'foo';
234 $_REQUEST['query'] = '';
235 $_SESSION['last_search_mod'] = 'bar';
237 $this->assertFalse($this->_lvd->shouldProcess('foo'));
238 $this->assertFalse($this->_lvd->should_process);
240 if ( isset($oldsavequery) ) {
241 $GLOBALS['sugar_config']['save_query'] = $oldsavequery;
245 public function testProcess()
248 'data' => array(1,2,3),
249 'pageData' => array('bean' => array('moduleDir'=>'testmoduledir'))
251 $this->_lvd->process('foo',$data,'testmetestme');
253 $this->assertEquals(3,$this->_lvd->rowCount);
254 $this->assertEquals('testmoduledir2_TESTMETESTME_offset',$this->_lvd->moduleString);
257 public function testDisplayIfShouldNotProcess()
259 $this->_lvd->should_process = false;
261 $this->assertEmpty($this->_lvd->display());
264 public function testDisplayIfMultiSelectFalse()
266 $this->_lvd->should_process = true;
267 $this->_lvd->multiSelect = false;
269 $this->assertEmpty($this->_lvd->display());
272 public function testDisplayIfShowMassUpdateFormFalse()
274 $this->_lvd->should_process = true;
275 $this->_lvd->show_mass_update_form = false;
277 $this->assertEmpty($this->_lvd->display());
280 public function testDisplayIfShowMassUpdateFormTrueAndMultiSelectTrue()
282 $this->_lvd->should_process = true;
283 $this->_lvd->show_mass_update_form = true;
284 $this->_lvd->multiSelect = true;
285 $this->_lvd->multi_select_popup = true;
286 $this->_lvd->mass = $this->getMock('MassUpdate');
287 $this->_lvd->mass->expects($this->any())
288 ->method('getDisplayMassUpdateForm')
289 ->will($this->returnValue('foo'));
290 $this->_lvd->mass->expects($this->any())
291 ->method('getMassUpdateFormHeader')
292 ->will($this->returnValue('bar'));
294 $this->assertEquals('foobar',$this->_lvd->display());
297 public function testBuildSelectLink()
299 $output = $this->_lvd->buildSelectLink();
301 $this->assertContains("<a id='select_link' onclick='return select_overlib();'",$output);
302 $this->assertContains("sListView.check_all(document.MassUpdate, \"mass[]\", true, 0)",$output);
303 $this->assertContains("sListView.check_entire_list(document.MassUpdate, \"mass[]\",true,0);",$output);
306 public function testBuildSelectLinkWithParameters()
308 $output = $this->_lvd->buildSelectLink('testtest',1,2);
310 $this->assertContains("<a id='testtest' onclick='return select_overlib();'",$output);
311 $this->assertContains("sListView.check_all(document.MassUpdate, \"mass[]\", true, 2)",$output);
312 $this->assertContains("sListView.check_entire_list(document.MassUpdate, \"mass[]\",true,1);",$output);
315 public function testBuildSelectLinkWithPageTotalLessThanZero()
317 $output = $this->_lvd->buildSelectLink('testtest',1,-1);
319 $this->assertContains("<a id='testtest' onclick='return select_overlib();'",$output);
320 $this->assertContains("sListView.check_all(document.MassUpdate, \"mass[]\", true, 1)",$output);
321 $this->assertContains("sListView.check_entire_list(document.MassUpdate, \"mass[]\",true,1);",$output);
324 public function testBuildExportLink()
326 $this->_lvd->seed = new stdClass;
327 $this->_lvd->seed->module_dir = 'testtest';
328 $output = $this->_lvd->buildExportLink();
330 $this->assertContains("return sListView.send_form(true, 'testtest', 'index.php?entryPoint=export',",$output);
333 public function testBuildMassUpdateLink()
335 $output = $this->_lvd->buildMassUpdateLink();
337 $this->assertRegExp("/.*document\.getElementById\(['\"]massupdate_form['\"]\)\.style\.display\s*=\s*['\"]['\"].*/", $output);
340 public function testComposeEmailIfFieldDefsNotAnArray()
342 $this->_lvd->seed = new stdClass;
343 $this->_lvd->seed->field_defs = false;
345 $this->assertEmpty($this->_lvd->buildComposeEmailLink(0));
348 public function testComposeEmailIfFieldDefsAreAnEmptyArray()
350 $this->_lvd->seed = new stdClass;
351 $this->_lvd->seed->field_defs = array();
353 $this->assertEmpty($this->_lvd->buildComposeEmailLink(0));
356 public function testComposeEmailIfFieldDefsDoNotHaveAnEmailAddressesRelationship()
358 $this->_lvd->seed = new stdClass;
359 $this->_lvd->seed->object_name = 'foobar';
360 $this->_lvd->seed->field_defs = array(
366 $this->assertEmpty($this->_lvd->buildComposeEmailLink(0));
369 public function testComposeEmailIfFieldDefsIfUsingSugarEmailClient()
371 $this->_lvd->seed = new stdClass;
372 $this->_lvd->seed->object_name = 'foobar';
373 $this->_lvd->seed->module_dir = 'foobarfoobar';
374 $this->_lvd->seed->field_defs = array(
377 'relationship' => 'foobar_emailaddresses',
380 $GLOBALS['dictionary']['foobar']['relationships']['foobar_emailaddresses']['rhs_module'] = 'EmailAddresses';
381 $GLOBALS['current_user']->setPreference('email_link_type','sugar');
383 $output = $this->_lvd->buildComposeEmailLink(5);
385 $this->assertContains(', \'foobarfoobar\', \'5\', ',$output);
387 unset($GLOBALS['dictionary']['foobar']);
390 public function testComposeEmailIfFieldDefsIfUsingExternalEmailClient()
392 $this->_lvd->seed = new stdClass;
393 $this->_lvd->seed->object_name = 'foobar';
394 $this->_lvd->seed->module_dir = 'foobarfoobar';
395 $_REQUEST['module'] = 'foobarfoobar';
396 $this->_lvd->seed->field_defs = array(
399 'relationship' => 'foobar_emailaddresses',
402 $_REQUEST['module'] = 'foo';
404 $GLOBALS['dictionary']['foobar']['relationships']['foobar_emailaddresses']['rhs_module'] = 'EmailAddresses';
405 $GLOBALS['current_user']->setPreference('email_link_type','mailto');
407 $output = $this->_lvd->buildComposeEmailLink(5);
409 $this->assertContains('sListView.use_external_mail_client',$output);
411 unset($GLOBALS['dictionary']['foobar']);
412 unset($_REQUEST['module']);
415 public function testBuildDeleteLink()
417 $output = $this->_lvd->buildDeleteLink();
419 $this->assertContains("return sListView.send_mass_update",$output);
422 public function testBuildSelectedObjectsSpan()
424 $output = $this->_lvd->buildSelectedObjectsSpan(1,1);
426 $this->assertContains("<input style='border: 0px; background: transparent; font-size: inherit; color: inherit' type='text' id='selectCountTop' readonly name='selectCount[]' value='1' />",$output);
429 public function testBuildMergeDuplicatesLinkWithNoAccess()
431 $this->markTestIncomplete('This test has not been implemented yet.');
434 public function testBuildMergeDuplicatesLinkWhenModuleDoesNotHaveItEnabled()
436 $this->_lvd->seed = new stdClass;
437 $this->_lvd->seed->object_name = 'foobar';
438 $this->_lvd->seed->module_dir = 'foobarfoobar';
439 $GLOBALS['dictionary']['foobar']['duplicate_merge'] = false;
440 $GLOBALS['current_user']->is_admin = 1;
442 $this->assertEmpty($this->_lvd->buildMergeDuplicatesLink());
445 public function testBuildMergeDuplicatesLink()
447 $this->_lvd->seed = new stdClass;
448 $this->_lvd->seed->object_name = 'foobar';
449 $this->_lvd->seed->module_dir = 'foobarfoobar';
450 $GLOBALS['dictionary']['foobar']['duplicate_merge'] = true;
451 $GLOBALS['current_user']->is_admin = 1;
453 $output = $this->_lvd->buildMergeDuplicatesLink();
455 $this->assertContains("\"foobarfoobar\",\"\");}",$output);
458 public function testBuildMergeDuplicatesLinkBuildsReturnString()
460 $this->_lvd->seed = new stdClass;
461 $this->_lvd->seed->object_name = 'foobar';
462 $this->_lvd->seed->module_dir = 'foobarfoobar';
463 $GLOBALS['dictionary']['foobar']['duplicate_merge'] = true;
464 $GLOBALS['current_user']->is_admin = 1;
465 $_REQUEST['module'] = 'foo';
466 $_REQUEST['action'] = 'bar';
467 $_REQUEST['record'] = '1';
469 $output = $this->_lvd->buildMergeDuplicatesLink();
471 $this->assertContains("\"foobarfoobar\",\"&return_module=foo&return_action=bar&return_id=1\");}",$output);
473 public function testBuildMergeLinkWhenUserDisabledMailMerge()
475 $this->_lvd->seed = new stdClass;
476 $this->_lvd->seed->module_dir = 'foobarfoobar';
477 $GLOBALS['current_user']->setPreference('mailmerge_on','off');
479 $this->assertEmpty($this->_lvd->buildMergeLink());
482 public function testBuildMergeLinkWhenSystemDisabledMailMerge()
484 $this->_lvd->seed = new stdClass;
485 $this->_lvd->seed->module_dir = 'foobarfoobar';
487 $GLOBALS['current_user']->setPreference('mailmerge_on','on');
489 $settings_cache = sugar_cache_retrieve('admin_settings_cache');
490 if ( empty($settings_cache) ) {
491 $settings_cache = array();
493 $settings_cache['system_mailmerge_on'] = false;
494 sugar_cache_put('admin_settings_cache',$settings_cache);
496 $this->assertEmpty($this->_lvd->buildMergeLink());
498 sugar_cache_clear('admin_settings_cache');
501 public function testBuildMergeLinkWhenModuleNotInModulesArray()
503 $this->_lvd->seed = new stdClass;
504 $this->_lvd->seed->module_dir = 'foobarfoobar';
506 $GLOBALS['current_user']->setPreference('mailmerge_on','on');
508 $settings_cache = sugar_cache_retrieve('admin_settings_cache');
509 if ( empty($settings_cache) ) {
510 $settings_cache = array();
512 $settings_cache['system_mailmerge_on'] = true;
513 sugar_cache_put('admin_settings_cache',$settings_cache);
515 $this->assertEmpty($this->_lvd->buildMergeLink(array('foobar' => 'foobar')));
517 sugar_cache_clear('admin_settings_cache');
520 public function testBuildMergeLink()
522 $this->_lvd->seed = new stdClass;
523 $this->_lvd->seed->module_dir = 'foobarfoobar';
525 $GLOBALS['current_user']->setPreference('mailmerge_on','on');
527 $settings_cache = sugar_cache_retrieve('admin_settings_cache');
528 if ( empty($settings_cache) ) {
529 $settings_cache = array();
531 $settings_cache['system_mailmerge_on'] = true;
532 sugar_cache_put('admin_settings_cache',$settings_cache);
534 $output = $this->_lvd->buildMergeLink(array('foobarfoobar' => 'foobarfoobar'));
535 $this->assertContains("index.php?action=index&module=MailMerge&entire=true",$output);
537 sugar_cache_clear('admin_settings_cache');
540 public function testBuildTargetLink()
542 $_POST['module'] = 'foobar';
543 $this->_lvd->seed = new stdClass;
544 $this->_lvd->seed->module_dir = 'foobarfoobar';
546 $output = $this->_lvd->buildTargetList();
548 $this->assertContains("input.setAttribute ( 'name' , 'module' ); input.setAttribute ( 'value' , 'foobarfoobar' );",$output);
549 $this->assertContains("input.setAttribute ( 'name' , 'current_query_by_page' ); input.setAttribute ( 'value', '".base64_encode(serialize($_REQUEST))."' );",$output);
552 public function testDisplayEndWhenNotShowingMassUpdateForm()
554 $this->_lvd->show_mass_update_form = false;
556 $this->assertEmpty($this->_lvd->displayEnd());
559 public function testDisplayEndWhenShowingMassUpdateForm()
561 $this->_lvd->show_mass_update_form = true;
562 $this->_lvd->mass = $this->getMock('MassUpdate');
563 $this->_lvd->mass->expects($this->any())
564 ->method('getMassUpdateForm')
565 ->will($this->returnValue('foo'));
566 $this->_lvd->mass->expects($this->any())
567 ->method('endMassUpdateForm')
568 ->will($this->returnValue('bar'));
570 $this->assertEquals('foobar',$this->_lvd->displayEnd());
573 public function testGetMultiSelectData()
575 $this->_lvd->moduleString = 'foobar';
577 $output = $this->_lvd->getMultiSelectData();
579 $this->assertEquals($output, "<script>YAHOO.util.Event.addListener(window, \"load\", sListView.check_boxes);</script>\n".
580 "<textarea style='display: none' name='uid'></textarea>\n" .
581 "<input type='hidden' name='select_entire_list' value='0'>\n".
582 "<input type='hidden' name='foobar' value='0'>\n".
583 "<input type='hidden' name='show_plus' value=''>\n",$output);
586 public function testGetMultiSelectDataWithRequestParameterUidSet()
588 $this->_lvd->moduleString = 'foobar';
589 $_REQUEST['uid'] = '1234';
591 $output = $this->_lvd->getMultiSelectData();
593 $this->assertEquals("<script>YAHOO.util.Event.addListener(window, \"load\", sListView.check_boxes);</script>\n".
594 "<textarea style='display: none' name='uid'>1234</textarea>\n" .
595 "<input type='hidden' name='select_entire_list' value='0'>\n".
596 "<input type='hidden' name='foobar' value='0'>\n" .
597 "<input type='hidden' name='show_plus' value=''>\n",$output);
600 public function testGetMultiSelectDataWithRequestParameterSelectEntireListSet()
602 $this->_lvd->moduleString = 'foobar';
603 $_REQUEST['select_entire_list'] = '1234';
605 $output = $this->_lvd->getMultiSelectData();
607 $this->assertEquals("<script>YAHOO.util.Event.addListener(window, \"load\", sListView.check_boxes);</script>\n".
608 "<textarea style='display: none' name='uid'></textarea>\n" .
609 "<input type='hidden' name='select_entire_list' value='1234'>\n".
610 "<input type='hidden' name='foobar' value='0'>\n" .
611 "<input type='hidden' name='show_plus' value=''>\n",$output);
614 public function testGetMultiSelectDataWithRequestParameterMassupdateSet()
616 $this->_lvd->moduleString = 'foobar';
617 $_REQUEST['uid'] = '1234';
618 $_REQUEST['select_entire_list'] = '5678';
619 $_REQUEST['massupdate'] = 'true';
621 $output = $this->_lvd->getMultiSelectData();
623 $this->assertEquals("<script>YAHOO.util.Event.addListener(window, \"load\", sListView.check_boxes);</script>\n".
624 "<textarea style='display: none' name='uid'></textarea>\n" .
625 "<input type='hidden' name='select_entire_list' value='0'>\n".
626 "<input type='hidden' name='foobar' value='0'>\n".
627 "<input type='hidden' name='show_plus' value=''>\n",$output);
631 class ListViewDisplayMock extends ListViewDisplay
633 public function buildExportLink()
635 return parent::buildExportLink();
638 public function buildMassUpdateLink()
640 return parent::buildMassUpdateLink();
643 public function buildComposeEmailLink($totalCount)
645 return parent::buildComposeEmailLink($totalCount);
648 public function buildDeleteLink()
650 return parent::buildDeleteLink();
653 public function buildMergeDuplicatesLink()
655 return parent::buildMergeDuplicatesLink();
658 public function buildMergeLink(array $modules_array = null)
660 return parent::buildMergeLink($modules_array);
663 public function buildTargetList()
665 return parent::buildTargetList();