本文整理汇总了PHP中Configure::delete方法的典型用法代码示例。如果您正苦于以下问题:PHP Configure::delete方法的具体用法?PHP Configure::delete怎么用?PHP Configure::delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Configure
的用法示例。
在下文中一共展示了Configure::delete方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: tearDown
/**
* tearDown method
*
* @return void
*/
public function tearDown()
{
Configure::delete('TestMailerConfig');
unset($this->Mailer);
ClassRegistry::flush();
parent::tearDown();
}
示例2: setUp
/**
* SetUp method
*
* @return void
*/
public function setUp()
{
parent::setUp();
Configure::delete('Typography.locale');
Configure::write('App.language', 'eng');
$this->Typography = new TypographyHelper(new View(null));
}
示例3: setUp
public function setUp()
{
parent::setUp();
Configure::delete('Localization');
$this->Model = ClassRegistry::init('PaymentMethod');
$this->Model->Behaviors->load('Tools.DecimalInput', ['fields' => ['rel_rate', 'set_rate'], 'output' => true]);
}
示例4: setUp
public function setUp()
{
parent::setUp();
Configure::delete('Localization');
$this->Model = ClassRegistry::init('PaymentMethod');
$this->Model->Behaviors->load('Tools.NumberFormat', array('fields' => array('rel_rate', 'set_rate'), 'output' => true));
}
示例5: setUp
public function setUp()
{
parent::setUp();
Configure::delete('Ajax');
$this->Controller = new AjaxComponentTestController(new CakeRequest(), new CakeResponse());
$this->Controller->constructClasses();
}
示例6: setUp
/**
* SetUp method
*
* @return void
*/
public function setUp()
{
parent::setUp();
Configure::write('Config.language', 'deu');
Configure::delete('Passwordable');
Configure::write('Passwordable.auth', 'AuthTest');
$this->User = ClassRegistry::init('Tools.ToolsUser');
if (isset($this->User->validate['pwd'])) {
unset($this->User->validate['pwd']);
}
if (isset($this->User->validate['pwd_repeat'])) {
unset($this->User->validate['pwd_repeat']);
}
if (isset($this->User->validate['pwd_current'])) {
unset($this->User->validate['pwd_current']);
}
if (isset($this->User->order)) {
unset($this->User->order);
}
$this->User->create();
$data = ['id' => '5', 'name' => 'admin', 'password' => Security::hash('somepwd', null, true), 'role_id' => '1'];
$this->User->set($data);
$result = $this->User->save();
$this->assertTrue((bool) $result);
Router::setRequestInfo(new CakeRequest(null, false));
}
示例7: endCase
public function endCase()
{
if (Configure::read('TestConfig')) {
Configure::delete('TestConfig');
}
parent::endCase();
}
示例8: tearDown
function tearDown()
{
ConnectionManager::drop('testapi');
ConnectionManager::drop('testapiToken');
Configure::delete('Copula.testapi.Auth');
unset($this->controller, $this->Oauth);
parent::tearDown();
}
示例9: setUp
/**
* setUp
*
* @retun void
* @access public
*/
public function setUp()
{
parent::setUp();
Configure::delete('PagSeguro');
$this->Controller = new Controller(null);
$this->Checkout = new CheckoutComponent($this->Controller->Components);
$this->Checkout->startup($this->Controller);
}
示例10: endTest
public function endTest($method = null)
{
Configure::delete(TestDisableActionsComponent::$testConfigName);
if ($this->_configBackup !== false) {
Configure::write(TestDisableActionsComponent::$testConfigName, $this->_configBackup);
}
parent::endTest($method);
}
示例11: isQmail
/**
* Returns whether the local MTA is qmail or not.
* This refers to the Configure to skip the auto-detection.
*
* @override
* @return boolean
*/
function isQmail()
{
$is_qmail = Configure::read('Qdmailer.is_qmail');
if (!is_null($is_qmail)) {
$this->is_qmail = $is_qmail;
}
Configure::delete('Qdmailer.is_qmail');
return parent::isQmail();
}
示例12: setUp
public function setUp()
{
parent::setUp();
Configure::delete('Auth');
$this->Controller = new AuthExtTestController(new CakeRequest(), new CakeResponse());
$this->Controller->constructClasses();
$this->Controller->startupProcess();
$this->Controller->User->belongsTo = ['Role' => ['className' => 'Tools.Role']];
}
示例13: setUp
public function setUp()
{
parent::setUp();
Configure::delete('Logable');
Configure::write('Config.language', 'eng');
$this->LogableBook = ClassRegistry::init('LogableBook');
$this->Log = ClassRegistry::init('LogableLog');
$this->LogableUser = ClassRegistry::init('LogableUser');
$this->LogableComment = ClassRegistry::init('LogableComment');
}
示例14: setUp
/**
* setUp method
*
* @return void
*/
public function setUp()
{
parent::setUp();
@($View = new View());
$this->Facebook = new FacebookHelper($View);
$this->Facebook->Html = new HtmlHelper($View);
$this->Facebook->Html->request = new CakeRequest(null, false);
$this->Facebook->Html->request->webroot = '';
Configure::delete('Facebook.appId');
Configure::write('Facebook.appId', '12345');
}
示例15: testNotSeedable
/**
* Test the seedability check on init
*
* @return void
* @covers ::initialize
* @covers ::_checkSeedable
*/
public function testNotSeedable()
{
Configure::delete('FakeSeeder.seedable');
$this->_shell->expects($this->at(0))->method('_stop')->with($this->equalTo('Seeding is not activated in configuration in "FakeSeeder.seedable"!'));
$this->_shell->initialize();
$debug = Configure::read('debug');
Configure::write('debug', 0);
$this->_shell->expects($this->at(1))->method('_stop')->with($this->equalTo('Seeding is allowed only in debug mode!'));
$this->_shell->initialize();
Configure::write('debug', $debug);
}