本文整理汇总了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();
}
示例2: setUpOnce
public function setUpOnce()
{
if (class_exists('Phockito')) {
Phockito::include_hamcrest(false);
}
parent::setUpOnce();
}
示例3: setUpOnce
function setUpOnce()
{
parent::setUpOnce();
if (class_exists('Phockito')) {
Phockito::include_hamcrest();
}
}
示例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);
}
示例5: setUpOnce
function setUpOnce()
{
if (!Controller::has_extension('AjaxControllerExtension')) {
Controller::add_extension('AjaxControllerExtension');
}
parent::setUpOnce();
}
示例6: setUpOnce
public function setUpOnce()
{
parent::setUpOnce();
if ($this->extraDataObjects) {
$this->generateDBEntries();
}
Config::inst()->update('Director', 'alternate_base_url', 'http://mysite.com/');
}
示例7: setUpOnce
public function setUpOnce()
{
// Disable illegal extensions if skipping this test
if (class_exists('Subsite') || !interface_exists('QueuedJob')) {
$this->illegalExtensions = array();
}
parent::setUpOnce();
}
示例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();
}
示例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');
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例15: setUpOnce
public function setUpOnce()
{
DataObject::add_extension('SiteTree', 'SolrIndexable');
parent::setUpOnce();
}