public function setUpOnce()
 {
     if (class_exists('Phockito')) {
         Phockito::include_hamcrest();
     }
     parent::setUpOnce();
 }
 function setUpOnce()
 {
     // HACK Postgres doesn't refresh TSearch indexes when the schema changes after CREATE TABLE
     if (is_a(DB::getConn(), 'PostgreSQLDatabase')) {
         self::kill_temp_db();
     }
     parent::setUpOnce();
 }
Esempio n. 3
0
	function setUpOnce() {
		// HACK Postgres doesn't refresh TSearch indexes when the schema changes after CREATE TABLE
		// MySQL will need a different table type
		self::kill_temp_db();
		FulltextSearchable::enable();
		self::create_temp_db();
		$this->resetDBSchema(true);
		parent::setUpOnce();
	}
 public function setUpOnce()
 {
     if (!ShoppingCart_Controller::has_extension('ShoppingCartAjax')) {
         ShoppingCart_Controller::add_extension('ShoppingCartAjax');
     }
     if (!VariationForm::has_extension('ShoppingCartAjax')) {
         VariationForm::add_extension('ShoppingCartAjax');
     }
     if (!Controller::has_extension('AjaxControllerExtension')) {
         Controller::add_extension('AjaxControllerExtension');
     }
     parent::setUpOnce();
 }
Esempio n. 5
0
 function setUpOnce()
 {
     parent::setUpOnce();
     self::$offset = time() - strtotime(DB::query('SELECT ' . DB::getConn()->now())->value());
     foreach (self::$offset_thresholds as $code => $offset) {
         if (abs(self::$offset) > $offset) {
             if ($code == E_USER_NOTICE) {
                 Debug::show('The time of the database is out of sync with the webserver by ' . abs(self::$offset) . ' seconds.');
             } else {
                 trigger_error('The time of the database is out of sync with the webserver by ' . abs(self::$offset) . ' seconds.', $code);
             }
             break;
         }
     }
 }
 function setUpOnce()
 {
     parent::setUpOnce();
     $this->origEnabled = DocumentationService::automatic_registration_enabled();
     DocumentationService::set_automatic_registration(false);
     $this->origModules = DocumentationService::get_registered_modules();
     $this->origLinkBase = DocumentationViewer::get_link_base();
     DocumentationViewer::set_link_base('dev/docs/');
     foreach ($this->origModules as $module) {
         DocumentationService::unregister($module->getModuleFolder());
     }
     // We set 3.0 as current, and test most assertions against 2.4 - to avoid 'current' rewriting issues
     DocumentationService::register("DocumentationViewerTests", BASE_PATH . "/sapphiredocs/tests/docs/", '2.4');
     DocumentationService::register("DocumentationViewerTests", BASE_PATH . "/sapphiredocs/tests/docs-2/", '2.3');
     DocumentationService::register("DocumentationViewerTests", BASE_PATH . "/sapphiredocs/tests/docs-3/", '3.0');
 }
 public function setUpOnce()
 {
     parent::setUpOnce();
     // clear session
     ShoppingCart::singleton()->clear();
 }
Esempio n. 8
0
 public function setUpOnce()
 {
     parent::setUpOnce();
     $this->savedNewsweights = NewsPage::get_weights();
 }
 public function setUpOnce()
 {
     parent::setUpOnce();
     $this->savedNewsweights = NewsPage::get_weights();
     NewsPage::set_weights(array('Normal', 'Teaser', 'Headline'));
 }