public function setUp()
 {
     parent::setUp();
     HookRegistry::rememberCalledHooks();
     $this->request = new PKPRequest();
     // Save the config data for testTrustXForwardedFor tests
     $this->getRemoteAddrTestConfigData = Registry::get('configData');
 }
예제 #2
0
 /**
  * @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();
 }
예제 #3
0
 /**
  * @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);
     }
 }
예제 #4
0
 /**
  * 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();
 }
예제 #5
0
 /**
  * @see PKPTestCase::setUp()
  */
 protected function setUp()
 {
     parent::setUp();
     HookRegistry::rememberCalledHooks();
 }
 protected function setUp()
 {
     parent::setUp();
     HookRegistry::rememberCalledHooks();
     $this->router = new PKPRouter();
 }