|
@@ -23,7 +23,7 @@ new ConfigurationTestGenerator(array(
|
|
|
'tests' => array(
|
|
'tests' => array(
|
|
|
array(
|
|
array(
|
|
|
'conditions' => array('steps' => $vd),
|
|
'conditions' => array('steps' => $vd),
|
|
|
- 'type' => 'RegExp',
|
|
|
|
|
|
|
+ 'type' => 'MatchesRegularExpression',
|
|
|
'args' => array(
|
|
'args' => array(
|
|
|
'#<div[^>]*id="opendiscussionoption"[^>]*>#',
|
|
'#<div[^>]*id="opendiscussionoption"[^>]*>#',
|
|
|
'$content',
|
|
'$content',
|
|
@@ -53,7 +53,7 @@ new ConfigurationTestGenerator(array(
|
|
|
'setting' => false,
|
|
'setting' => false,
|
|
|
'tests' => array(
|
|
'tests' => array(
|
|
|
array(
|
|
array(
|
|
|
- 'type' => 'NotRegExp',
|
|
|
|
|
|
|
+ 'type' => 'DoesNotMatchRegularExpression',
|
|
|
'args' => array(
|
|
'args' => array(
|
|
|
'#<div[^>]*id="opendiscussionoption"[^>]*>#',
|
|
'#<div[^>]*id="opendiscussionoption"[^>]*>#',
|
|
|
'$content',
|
|
'$content',
|
|
@@ -70,7 +70,7 @@ new ConfigurationTestGenerator(array(
|
|
|
'tests' => array(
|
|
'tests' => array(
|
|
|
array(
|
|
array(
|
|
|
'conditions' => array('main/discussion' => true),
|
|
'conditions' => array('main/discussion' => true),
|
|
|
- 'type' => 'RegExp',
|
|
|
|
|
|
|
+ 'type' => 'MatchesRegularExpression',
|
|
|
'args' => array(
|
|
'args' => array(
|
|
|
'#<input[^>]+id="opendiscussion"[^>]*checked="checked"[^>]*>#',
|
|
'#<input[^>]+id="opendiscussion"[^>]*checked="checked"[^>]*>#',
|
|
|
'$content',
|
|
'$content',
|
|
@@ -84,7 +84,7 @@ new ConfigurationTestGenerator(array(
|
|
|
'tests' => array(
|
|
'tests' => array(
|
|
|
array(
|
|
array(
|
|
|
'conditions' => array('main/discussion' => true),
|
|
'conditions' => array('main/discussion' => true),
|
|
|
- 'type' => 'NotRegExp',
|
|
|
|
|
|
|
+ 'type' => 'DoesNotMatchRegularExpression',
|
|
|
'args' => array(
|
|
'args' => array(
|
|
|
'#<input[^>]+id="opendiscussion"[^>]*checked="checked"[^>]*>#',
|
|
'#<input[^>]+id="opendiscussion"[^>]*checked="checked"[^>]*>#',
|
|
|
'$content',
|
|
'$content',
|
|
@@ -100,7 +100,7 @@ new ConfigurationTestGenerator(array(
|
|
|
'setting' => true,
|
|
'setting' => true,
|
|
|
'tests' => array(
|
|
'tests' => array(
|
|
|
array(
|
|
array(
|
|
|
- 'type' => 'RegExp',
|
|
|
|
|
|
|
+ 'type' => 'MatchesRegularExpression',
|
|
|
'args' => array(
|
|
'args' => array(
|
|
|
'#<input[^>]+id="burnafterreading"[^>]*checked="checked"[^>]*>#',
|
|
'#<input[^>]+id="burnafterreading"[^>]*checked="checked"[^>]*>#',
|
|
|
'$content',
|
|
'$content',
|
|
@@ -113,7 +113,7 @@ new ConfigurationTestGenerator(array(
|
|
|
'setting' => false,
|
|
'setting' => false,
|
|
|
'tests' => array(
|
|
'tests' => array(
|
|
|
array(
|
|
array(
|
|
|
- 'type' => 'NotRegExp',
|
|
|
|
|
|
|
+ 'type' => 'DoesNotMatchRegularExpression',
|
|
|
'args' => array(
|
|
'args' => array(
|
|
|
'#<input[^>]+id="burnafterreading"[^>]*checked="checked"[^>]*>#',
|
|
'#<input[^>]+id="burnafterreading"[^>]*checked="checked"[^>]*>#',
|
|
|
'$content',
|
|
'$content',
|
|
@@ -129,7 +129,7 @@ new ConfigurationTestGenerator(array(
|
|
|
'setting' => true,
|
|
'setting' => true,
|
|
|
'tests' => array(
|
|
'tests' => array(
|
|
|
array(
|
|
array(
|
|
|
- 'type' => 'RegExp',
|
|
|
|
|
|
|
+ 'type' => 'MatchesRegularExpression',
|
|
|
'args' => array(
|
|
'args' => array(
|
|
|
'#<div[^>]*id="password"[^>]*>#',
|
|
'#<div[^>]*id="password"[^>]*>#',
|
|
|
'$content',
|
|
'$content',
|
|
@@ -143,7 +143,7 @@ new ConfigurationTestGenerator(array(
|
|
|
'tests' => array(
|
|
'tests' => array(
|
|
|
array(
|
|
array(
|
|
|
'conditions' => array('main/discussion' => true),
|
|
'conditions' => array('main/discussion' => true),
|
|
|
- 'type' => 'NotRegExp',
|
|
|
|
|
|
|
+ 'type' => 'DoesNotMatchRegularExpression',
|
|
|
'args' => array(
|
|
'args' => array(
|
|
|
'#<div[^>]*id="password"[^>]*>#',
|
|
'#<div[^>]*id="password"[^>]*>#',
|
|
|
'$content',
|
|
'$content',
|
|
@@ -159,14 +159,14 @@ new ConfigurationTestGenerator(array(
|
|
|
'setting' => 'page',
|
|
'setting' => 'page',
|
|
|
'tests' => array(
|
|
'tests' => array(
|
|
|
array(
|
|
array(
|
|
|
- 'type' => 'RegExp',
|
|
|
|
|
|
|
+ 'type' => 'MatchesRegularExpression',
|
|
|
'args' => array(
|
|
'args' => array(
|
|
|
'#<link[^>]+type="text/css"[^>]+rel="stylesheet"[^>]+href="css/privatebin\.css\\?\d[\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',
|
|
|
),
|
|
),
|
|
|
), array(
|
|
), array(
|
|
|
- 'type' => 'NotRegExp',
|
|
|
|
|
|
|
+ 'type' => 'DoesNotMatchRegularExpression',
|
|
|
'args' => array(
|
|
'args' => array(
|
|
|
'#<link[^>]+type="text/css"[^>]+rel="stylesheet"[^>]+href="css/bootstrap/bootstrap-\d[\d\.]+\d\.css"[^>]*/>#',
|
|
'#<link[^>]+type="text/css"[^>]+rel="stylesheet"[^>]+href="css/bootstrap/bootstrap-\d[\d\.]+\d\.css"[^>]*/>#',
|
|
|
'$content',
|
|
'$content',
|
|
@@ -179,14 +179,14 @@ new ConfigurationTestGenerator(array(
|
|
|
'setting' => 'bootstrap',
|
|
'setting' => 'bootstrap',
|
|
|
'tests' => array(
|
|
'tests' => array(
|
|
|
array(
|
|
array(
|
|
|
- 'type' => 'NotRegExp',
|
|
|
|
|
|
|
+ 'type' => 'DoesNotMatchRegularExpression',
|
|
|
'args' => array(
|
|
'args' => array(
|
|
|
'#<link[^>]+type="text/css"[^>]+rel="stylesheet"[^>]+href="css/privatebin\.css\\?\d[\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',
|
|
|
),
|
|
),
|
|
|
), array(
|
|
), array(
|
|
|
- 'type' => 'RegExp',
|
|
|
|
|
|
|
+ 'type' => 'MatchesRegularExpression',
|
|
|
'args' => array(
|
|
'args' => array(
|
|
|
'#<link[^>]+type="text/css"[^>]+rel="stylesheet"[^>]+href="css/bootstrap/bootstrap-\d[\d\.]+\d\.css"[^>]*/>#',
|
|
'#<link[^>]+type="text/css"[^>]+rel="stylesheet"[^>]+href="css/bootstrap/bootstrap-\d[\d\.]+\d\.css"[^>]*/>#',
|
|
|
'$content',
|
|
'$content',
|
|
@@ -361,7 +361,7 @@ class ConfigurationTestGenerator
|
|
|
}
|
|
}
|
|
|
// skip if not all test conditions are met
|
|
// skip if not all test conditions are met
|
|
|
if (array_key_exists('conditions', $test)) {
|
|
if (array_key_exists('conditions', $test)) {
|
|
|
- while (list($path, $setting) = each($test['conditions'])) {
|
|
|
|
|
|
|
+ foreach ($test['conditions'] as $path => $setting) {
|
|
|
if ($path == 'steps' && !in_array($step, $setting)) {
|
|
if ($path == 'steps' && !in_array($step, $setting)) {
|
|
|
continue 2;
|
|
continue 2;
|
|
|
} elseif ($path != 'steps') {
|
|
} elseif ($path != 'steps') {
|
|
@@ -591,8 +591,9 @@ EOT;
|
|
|
return $this->_configurations;
|
|
return $this->_configurations;
|
|
|
}
|
|
}
|
|
|
echo "generateConfigurations: iteration $this->_iterationCount", PHP_EOL;
|
|
echo "generateConfigurations: iteration $this->_iterationCount", PHP_EOL;
|
|
|
- $continue = list($path, $settings) = each($this->_options);
|
|
|
|
|
- if ($continue === false) {
|
|
|
|
|
|
|
+ $path = key($this->_options);
|
|
|
|
|
+ $settings = current($this->_options);
|
|
|
|
|
+ if (next($this->_options) === false) {
|
|
|
return $this->_configurations;
|
|
return $this->_configurations;
|
|
|
}
|
|
}
|
|
|
list($section, $option) = explode('/', $path);
|
|
list($section, $option) = explode('/', $path);
|