setAppListString('moduleList',array('Foo'=>'Bar')); $langpack->save(); $result = array( 'Foo' => array( 'data' => array( array( 'ID' => '1', 'NAME' => 'recordname', ), ), 'pageData' => array( 'offsets' => array( 'total' => 1, 'next' => 0, ), 'bean' => array( 'moduleDir' => 'Foo', ), ), ), ); $sugarSpot = $this->getMock('SugarSpot', array('_performSearch')); $sugarSpot->expects($this->any()) ->method('_performSearch') ->will($this->returnValue($result)); $returnValue = $sugarSpot->searchAndDisplay('',''); $this->assertNotContains('
Foo
',$returnValue); $this->assertContains('
Bar
',$returnValue); } }