function setUpOnce()
 {
     if (class_exists('Comment')) {
         Comment::add_extension('DrupalCommentExtension');
     }
     parent::setUpOnce();
 }
 public function setUpOnce()
 {
     if (class_exists('Phockito')) {
         Phockito::include_hamcrest(false);
     }
     parent::setUpOnce();
 }
 function setUpOnce()
 {
     parent::setUpOnce();
     if (class_exists('Phockito')) {
         Phockito::include_hamcrest();
     }
 }
 public function setUpOnce()
 {
     parent::setUpOnce();
     // set backend
     SS_Cache::add_backend(self::$backend_name, new MongodbBackend(self::$cache_opts));
     SS_Cache::pick_backend(self::$backend_name, self::$cache_name, 100);
 }
 function setUpOnce()
 {
     if (!Controller::has_extension('AjaxControllerExtension')) {
         Controller::add_extension('AjaxControllerExtension');
     }
     parent::setUpOnce();
 }
 public function setUpOnce()
 {
     parent::setUpOnce();
     if ($this->extraDataObjects) {
         $this->generateDBEntries();
     }
     Config::inst()->update('Director', 'alternate_base_url', 'http://mysite.com/');
 }
 public function setUpOnce()
 {
     // Disable illegal extensions if skipping this test
     if (class_exists('Subsite') || !interface_exists('QueuedJob')) {
         $this->illegalExtensions = array();
     }
     parent::setUpOnce();
 }
 public function setUpOnce()
 {
     parent::setUpOnce();
     // Reset the API name in case the current site configuration has changed it
     $this->oldApiName = HMACRestfulAuthenticator::getApiName();
     HMACRestfulAuthenticator::setApiName('Api');
     Config::inst()->update('Director', 'rules', ['TestController' => 'Sheerwater\\HMACRestfulAuthenticator\\Tests\\TestController']);
 }
 public function setUpOnce()
 {
     Config::nest();
     VersionableExtensionsTest_DataObject::add_extension('Versioned');
     VersionableExtensionsTest_DataObject::add_extension('VersionableExtensionsTest_Extension');
     $cfg = Config::inst();
     $cfg->update('VersionableExtensionsTest_DataObject', 'versionableExtensions', array('VersionableExtensionsTest_Extension' => array('test1', 'test2', 'test3')));
     parent::setUpOnce();
 }
 public function setUpOnce()
 {
     parent::setUpOnce();
     Restrictable::set_enabled(false);
     BasicAuth::protect_entire_site(false);
     // needs to be done this way to work around SS bug
     //		include_once dirname(dirname(__FILE__)).'/extensions/Restrictable.php';
     //		Object::add_extension('PrivateObject', 'Restrictable');
 }
 public function setUpOnce()
 {
     i18n::set_locale('en_GB');
     Config::nest();
     // Stop updating the file system, it's not helpful and causes issues with
     // the automatic fixture image loader
     Config::inst()->update('File', 'update_filesystem', false);
     parent::setUpOnce();
 }
 public function setUpOnce()
 {
     // Ensure that Fluent doesn't interfere with scaffolding records from FluentTest.yml
     FluentExtension::set_enable_write_augmentation(false);
     Config::nest();
     $this->setDefaultConfig();
     // Force db regeneration using the above values
     self::kill_temp_db();
     self::create_temp_db();
     $this->resetDBSchema(true);
     parent::setUpOnce();
     FluentExtension::set_enable_write_augmentation(true);
     Config::unnest();
 }
 public function setUpOnce()
 {
     // normalize the configuration
     Config::inst()->update('ShopSearch', 'buyables_are_searchable', false);
     Config::inst()->remove('ShopSearch', 'searchable');
     Config::inst()->update('ShopSearch', 'searchable', array('Product'));
     Config::inst()->update('ShopSearch', 'adapter_class', 'ShopSearchSimple');
     Config::inst()->remove('Product', 'searchable_fields');
     Config::inst()->update('Product', 'searchable_fields', array('Title', 'Content'));
     Config::inst()->remove('Product', 'default_attributes');
     Config::inst()->remove('ShopSearch', 'facets');
     Config::inst()->update('FacetHelper', 'sort_facet_values', true);
     Config::inst()->update('FacetHelper', 'faster_faceting', false);
     $p = singleton('Product');
     if (!$p->hasExtension('VirtualFieldIndex')) {
         Product::add_extension('VirtualFieldIndex');
     }
     Config::inst()->remove('VirtualFieldIndex', 'vfi_spec');
     Config::inst()->update('VirtualFieldIndex', 'vfi_spec', array('Product' => array('Price2' => 'sellingPrice', 'Price' => array('Source' => 'sellingPrice', 'DBField' => 'Currency', 'DependsOn' => 'BasePrice'), 'Category' => array('Parent', 'ProductCategories'))));
     if (!$p->hasExtension('HasStaticAttributes')) {
         Product::add_extension('HasStaticAttributes');
     }
     parent::setUpOnce();
 }
 /**
  * Before running the tests, we need to copy the test templates into assets.
  * The yaml file points to these temporary folders. This is required because
  * Folder/File classes have dependencies on assets, but we don't want them
  * permanently sitting there.
  *
  * @return void
  */
 function setUpOnce()
 {
     parent::setUpOnce();
 }
 public function setUpOnce()
 {
     DataObject::add_extension('SiteTree', 'SolrIndexable');
     parent::setUpOnce();
 }
 public function setUpOnce()
 {
     $this->extraDataObjects = DataObjectTest::$extra_data_objects;
     parent::setUpOnce();
 }
 function setUpOnce()
 {
     Config::inst()->remove('HasGroupPricing', 'price_levels');
     Config::inst()->update('HasGroupPricing', 'price_levels', array('customers' => 'CustomerPrice', 'wholesale' => 'WholesalePrice'));
     parent::setUpOnce();
 }
 public function setUpOnce()
 {
     // enable fulltext option on this table
     Config::inst()->update('DataObjectSchemaGenerationTest_IndexDO', 'create_table_options', array(MySQLSchemaManager::ID => 'ENGINE=MyISAM'));
     parent::setUpOnce();
 }
 function setUp()
 {
     $this->bucket = CloudAssets::inst()->map('assets/Uploads/CloudAssetsS3Test.txt');
     parent::setUpOnce();
 }
 public function setUpOnce()
 {
     parent::setUpOnce();
     // clear session
     ShoppingCart::singleton()->clear();
 }
 public function setUpOnce()
 {
     parent::setUpOnce();
     $this->loadConfig(self::$config);
 }
 public function setUpOnce()
 {
     parent::setUpOnce();
     FulltextSearchable::enable('File');
 }
 /**
  * Get the existing configuration
  * @return void
  */
 function setUpOnce()
 {
     self::$saved_interfaces = MessageQueue::get_interfaces();
     // Clear all interface definitions. Individual tests will provide their own.
     foreach (self::$saved_interfaces as $name => $def) {
         MessageQueue::remove_interface($name);
     }
     parent::setUpOnce();
 }
 public function setUpOnce()
 {
     Injector::nest();
     Injector::inst()->registerService(new TestFetcher(), 'Fetcher');
     parent::setUpOnce();
 }
 public function setUpOnce()
 {
     parent::setUpOnce();
     Phockito::include_hamcrest();
 }
 /**
  * Set up for the series of tests
  *
  * @return void
  * @author Andrew Lowther <*****@*****.**>
  **/
 public function setUpOnce()
 {
     $this->orig_env_type = Config::inst()->get('Director', 'environment_type');
     Config::inst()->update('Director', 'environment_type', 'dev');
     parent::setUpOnce();
 }
 public function setUpOnce()
 {
     parent::setUpOnce();
     error_reporting(E_ALL);
 }
 public function setUpOnce()
 {
     parent::setUpOnce();
     Config::inst()->remove('CloudAssets', 'map');
     Config::inst()->update('CloudAssets', 'map', array('assets/FileTest-folder1' => array('BaseURL' => 'http://testcdn.com/', 'Type' => 'MockBucket', 'LocalCopy' => true)));
 }
 public function setUpOnce()
 {
     parent::setUpOnce();
     Restrictable::set_enabled(true);
 }