mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2024-03-22 13:10:41 +08:00
adapting configuration test generator to new INI model and point release support
This commit is contained in:
parent
9f26894b2e
commit
cd5fded4a4
|
@ -159,7 +159,7 @@ new ConfigurationTestGenerator(array(
|
||||||
array(
|
array(
|
||||||
'type' => 'RegExp',
|
'type' => 'RegExp',
|
||||||
'args' => array(
|
'args' => array(
|
||||||
'#<link[^>]+type="text/css"[^>]+rel="stylesheet"[^>]+href="css/privatebin\.css\\?\d+\.\d+"[^>]*/>#',
|
'#<link[^>]+type="text/css"[^>]+rel="stylesheet"[^>]+href="css/privatebin\.css\\?\d[\d\.]+\d+"[^>]*/>#',
|
||||||
'$content',
|
'$content',
|
||||||
'outputs "page" stylesheet correctly',
|
'outputs "page" stylesheet correctly',
|
||||||
),
|
),
|
||||||
|
@ -179,7 +179,7 @@ new ConfigurationTestGenerator(array(
|
||||||
array(
|
array(
|
||||||
'type' => 'NotRegExp',
|
'type' => 'NotRegExp',
|
||||||
'args' => array(
|
'args' => array(
|
||||||
'#<link[^>]+type="text/css"[^>]+rel="stylesheet"[^>]+href="css/privatebin\.css\\?\d+\.\d+"[^>]*/>#',
|
'#<link[^>]+type="text/css"[^>]+rel="stylesheet"[^>]+href="css/privatebin\.css\\?\d[\d\.]+\d+"[^>]*/>#',
|
||||||
'$content',
|
'$content',
|
||||||
'removes "page" stylesheet correctly',
|
'removes "page" stylesheet correctly',
|
||||||
),
|
),
|
||||||
|
@ -344,7 +344,7 @@ class ConfigurationTestGenerator
|
||||||
*/
|
*/
|
||||||
private function _writeConfigurationTest()
|
private function _writeConfigurationTest()
|
||||||
{
|
{
|
||||||
$defaultOptions = parse_ini_file(CONF, true);
|
$defaultOptions = parse_ini_file(CONF_SAMPLE, true);
|
||||||
$code = $this->_getHeader();
|
$code = $this->_getHeader();
|
||||||
foreach ($this->_configurations as $key => $conf) {
|
foreach ($this->_configurations as $key => $conf) {
|
||||||
$fullOptions = array_replace_recursive($defaultOptions, $conf['options']);
|
$fullOptions = array_replace_recursive($defaultOptions, $conf['options']);
|
||||||
|
@ -435,6 +435,7 @@ class ConfigurationCombinationsTest extends PHPUnit_Framework_TestCase
|
||||||
public function tearDown()
|
public function tearDown()
|
||||||
{
|
{
|
||||||
/* Tear Down Routine */
|
/* Tear Down Routine */
|
||||||
|
unlink(CONF);
|
||||||
Helper::confRestore();
|
Helper::confRestore();
|
||||||
Helper::rmDir($this->_path);
|
Helper::rmDir($this->_path);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user