當前位置: 首頁>>代碼示例>>PHP>>正文


PHP SapphireTest::setUpOnce方法代碼示例

本文整理匯總了PHP中SapphireTest::setUpOnce方法的典型用法代碼示例。如果您正苦於以下問題:PHP SapphireTest::setUpOnce方法的具體用法?PHP SapphireTest::setUpOnce怎麽用?PHP SapphireTest::setUpOnce使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在SapphireTest的用法示例。


在下文中一共展示了SapphireTest::setUpOnce方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: setUpOnce

 function setUpOnce()
 {
     if (class_exists('Comment')) {
         Comment::add_extension('DrupalCommentExtension');
     }
     parent::setUpOnce();
 }
開發者ID:helpfulrobot,項目名稱:chillu-drupal-blog-importer,代碼行數:7,代碼來源:DrupalBlogCommentBulkLoaderTest.php

示例2: setUpOnce

 public function setUpOnce()
 {
     if (class_exists('Phockito')) {
         Phockito::include_hamcrest(false);
     }
     parent::setUpOnce();
 }
開發者ID:helpfulrobot,項目名稱:govtnz-silverstripe-externallinks,代碼行數:7,代碼來源:ExternalLinksTest.php

示例3: setUpOnce

 function setUpOnce()
 {
     parent::setUpOnce();
     if (class_exists('Phockito')) {
         Phockito::include_hamcrest();
     }
 }
開發者ID:helpfulrobot,項目名稱:silverstripe-fulltextsearch,代碼行數:7,代碼來源:SolrIndexTest.php

示例4: setUpOnce

 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);
 }
開發者ID:notthatbad,項目名稱:silverstripe-caching,代碼行數:7,代碼來源:MongoCacheBackendTest.php

示例5: setUpOnce

 function setUpOnce()
 {
     if (!Controller::has_extension('AjaxControllerExtension')) {
         Controller::add_extension('AjaxControllerExtension');
     }
     parent::setUpOnce();
 }
開發者ID:helpfulrobot,項目名稱:markguinn-silverstripe-ajax,代碼行數:7,代碼來源:AjaxResponseTest.php

示例6: setUpOnce

 public function setUpOnce()
 {
     parent::setUpOnce();
     if ($this->extraDataObjects) {
         $this->generateDBEntries();
     }
     Config::inst()->update('Director', 'alternate_base_url', 'http://mysite.com/');
 }
開發者ID:colymba,項目名稱:silverstripe-restfulapi,代碼行數:8,代碼來源:RESTfulAPI_Tester.php

示例7: setUpOnce

 public function setUpOnce()
 {
     // Disable illegal extensions if skipping this test
     if (class_exists('Subsite') || !interface_exists('QueuedJob')) {
         $this->illegalExtensions = array();
     }
     parent::setUpOnce();
 }
開發者ID:helpfulrobot,項目名稱:silverstripe-fulltextsearch,代碼行數:8,代碼來源:BatchedProcessorTest.php

示例8: 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']);
 }
開發者ID:helpfulrobot,項目名稱:sheerwater-ss-hmac-restful-authenticator,代碼行數:8,代碼來源:HMACRestfulAuthenticatorTest.php

示例9: setUpOnce

 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();
 }
開發者ID:assertchris,項目名稱:silverstripe-framework,代碼行數:9,代碼來源:VersionableExtensionsTest.php

示例10: 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');
 }
開發者ID:helpfulrobot,項目名稱:silverstripe-restrictedobjects,代碼行數:9,代碼來源:TestRestrictedObject.php

示例11: setUpOnce

 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();
 }
開發者ID:helpfulrobot,項目名稱:willmorgan-silverstripe-cropperfield,代碼行數:9,代碼來源:TestCase.php

示例12: 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();
 }
開發者ID:Digitweaks,項目名稱:silverstripe-fluent,代碼行數:14,代碼來源:FluentTest.php

示例13: setUpOnce

 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();
 }
開發者ID:hex0id,項目名稱:silverstripe-shop-search,代碼行數:24,代碼來源:ShopSearchTest.php

示例14: 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();
 }
開發者ID:nyeholt,項目名稱:silverstripe-dynamictemplate,代碼行數:12,代碼來源:DynamicTemplateTest.php

示例15: setUpOnce

 public function setUpOnce()
 {
     DataObject::add_extension('SiteTree', 'SolrIndexable');
     parent::setUpOnce();
 }
開發者ID:helpfulrobot,項目名稱:silverstripe-solr,代碼行數:5,代碼來源:SolrIndexingTest.php


注:本文中的SapphireTest::setUpOnce方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。