refactoring configuration
This commit is contained in:
@@ -589,7 +589,7 @@ class configurationTestGenerator
|
||||
return <<<'EOT'
|
||||
<?php
|
||||
/**
|
||||
* DO NOT EDIT: This file is automatically generated by configGenerator.php
|
||||
* DO NOT EDIT: This file is generated automatically using configGenerator.php
|
||||
*/
|
||||
class configurationTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
@@ -600,9 +600,7 @@ class configurationTest extends PHPUnit_Framework_TestCase
|
||||
public function setUp()
|
||||
{
|
||||
/* Setup Routine */
|
||||
$this->_conf = PATH . 'cfg' . DIRECTORY_SEPARATOR . 'conf.ini';
|
||||
if (!is_file($this->_conf . '.bak') && is_file($this->_conf))
|
||||
rename($this->_conf, $this->_conf . '.bak');
|
||||
helper::confBackup();
|
||||
|
||||
$this->_model = zerobin_data::getInstance(array('dir' => PATH . 'data'));
|
||||
serversalt::setPath(PATH . 'data');
|
||||
@@ -612,7 +610,7 @@ class configurationTest extends PHPUnit_Framework_TestCase
|
||||
public function tearDown()
|
||||
{
|
||||
/* Tear Down Routine */
|
||||
rename($this->_conf . '.bak', $this->_conf);
|
||||
helper::confRestore();
|
||||
}
|
||||
|
||||
public function reset($configuration = array())
|
||||
@@ -622,7 +620,7 @@ class configurationTest extends PHPUnit_Framework_TestCase
|
||||
$_SERVER = array();
|
||||
if ($this->_model->exists(helper::getPasteId()))
|
||||
$this->_model->delete(helper::getPasteId());
|
||||
helper::createIniFile($this->_conf, $configuration);
|
||||
helper::createIniFile(CONF, $configuration);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user