当前位置: 首页>>代码示例>>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;未经允许,请勿转载。