public function setUp() { parent::setUp(); $this->fixture = $this->getMock('Fab\\Vidi\\Tca\\GridService', array('getModulePreferences'), array('tx_foo', Tca::TYPE_GRID)); // Configure the ModulePreferences $mockModulePreferences = $this->getMock('Fab\\Vidi\\Module\\ModulePreferences'); $mockModulePreferences->expects($this->once())->method('get')->will($this->returnValue(array())); $this->fixture->expects($this->once())->method('getModulePreferences')->will($this->returnValue($mockModulePreferences)); $GLOBALS['BE_USER'] = $this->getMock('TYPO3\\CMS\\Core\\Authentication\\BackendUserAuthentication', array(), array(), '', FALSE); $GLOBALS['BE_USER']->expects($this->any())->method('isAdmin')->will($this->returnValue(TRUE)); }
public function setUp() { parent::setUp(); $this->fixture = new \Fab\Vidi\Tca\TableService('tx_foo', Tca::TYPE_TABLE); }