/** * @test */ public function processHideUnhideWithUidOfExistingEventChecksPermissions() { tx_oelib_MapperRegistry::denyDatabaseAccess(); $eventEditor = $this->getMock('tx_seminars_FrontEnd_EventEditor', array('hasAccessMessage'), array(), '', FALSE); $eventEditor->expects(self::once())->method('hasAccessMessage'); $fixture = $this->getMock($this->createAccessibleProxyClass(), array('createEventEditorInstance', 'hideEvent', 'unhideEvent')); $fixture->expects(self::atLeastOnce())->method('createEventEditorInstance')->will(self::returnValue($eventEditor)); $fixture->piVars['seminar'] = tx_oelib_MapperRegistry::get('tx_seminars_Mapper_Event')->getNewGhost()->getUid(); $fixture->processHideUnhide(); }