public function setUp() { parent::setUp(); HookRegistry::rememberCalledHooks(); $this->request = new PKPRequest(); // Save the config data for testTrustXForwardedFor tests $this->getRemoteAddrTestConfigData = Registry::get('configData'); }
/** * @see PKPTestCase::setUp() */ protected function setUp() { parent::setUp(); HookRegistry::rememberCalledHooks(); // Prepare the mock environment for this test. $this->registerMockArticleSearchDAO(); $this->registerMockArticleDAO(); $this->registerMockPublishedArticleDAO(); $this->registerMockIssueDAO(); $this->registerMockJournalDAO(); $this->registerMockSectionDAO(); }
/** * @see PKPTestCase::setUp() */ protected function setUp() { parent::setUp(); HookRegistry::rememberCalledHooks(); // Prepare the mock environment for this test. $this->registerMockArticleSearchDAO(); $this->registerMockArticleDAO(); $this->registerMockPublishedArticleDAO(); $this->registerMockIssueDAO(); $this->registerMockJournalDAO(); $this->registerMockSectionDAO(); $application = PKPApplication::getApplication(); $request = $application->getRequest(); if (is_null($request->getRouter())) { $router = new PKPRouter(); $request->setRouter($router); } }
/** * Switch off the function to store hooks and delete all stored hooks. * Always call this after using otherwise we get a severe memory. * @param $leaveAlive boolean Set this to true if you only want to * delete hooks stored so far but if you want to record future * hook calls, too. */ function resetCalledHooks($leaveAlive = false) { if (!$leaveAlive) { HookRegistry::rememberCalledHooks(false, false); } $calledHooks =& HookRegistry::getCalledHooks(); $calledHooks = array(); }
/** * @see PKPTestCase::setUp() */ protected function setUp() { parent::setUp(); HookRegistry::rememberCalledHooks(); }
protected function setUp() { parent::setUp(); HookRegistry::rememberCalledHooks(); $this->router = new PKPRouter(); }