|
|
@ -9,7 +9,6 @@
|
|
|
|
* DANGER: Too many options/settings and too high max iteration setting may trigger
|
|
|
|
* DANGER: Too many options/settings and too high max iteration setting may trigger
|
|
|
|
* a fork bomb. Please save your work before executing this script.
|
|
|
|
* a fork bomb. Please save your work before executing this script.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
include 'Bootstrap.php';
|
|
|
|
include 'Bootstrap.php';
|
|
|
|
|
|
|
|
|
|
|
|
$vrd = array('view', 'read', 'delete');
|
|
|
|
$vrd = array('view', 'read', 'delete');
|
|
|
@ -26,7 +25,7 @@ new ConfigurationTestGenerator(array(
|
|
|
|
'args' => array(
|
|
|
|
'args' => array(
|
|
|
|
'#<div[^>]*id="opendisc"[^>]*>#',
|
|
|
|
'#<div[^>]*id="opendisc"[^>]*>#',
|
|
|
|
'$content',
|
|
|
|
'$content',
|
|
|
|
'outputs enabled discussion correctly'
|
|
|
|
'outputs enabled discussion correctly',
|
|
|
|
),
|
|
|
|
),
|
|
|
|
), array(
|
|
|
|
), array(
|
|
|
|
'conditions' => array('steps' => array('create'), 'traffic/limit' => 10),
|
|
|
|
'conditions' => array('steps' => array('create'), 'traffic/limit' => 10),
|
|
|
@ -35,7 +34,7 @@ new ConfigurationTestGenerator(array(
|
|
|
|
'args' => array(
|
|
|
|
'args' => array(
|
|
|
|
1,
|
|
|
|
1,
|
|
|
|
'$response["status"]',
|
|
|
|
'$response["status"]',
|
|
|
|
'when discussions are enabled, but invalid flag posted, fail to create paste'
|
|
|
|
'when discussions are enabled, but invalid flag posted, fail to create paste',
|
|
|
|
),
|
|
|
|
),
|
|
|
|
), array(
|
|
|
|
), array(
|
|
|
|
'conditions' => array('steps' => array('create'), 'traffic/limit' => 10),
|
|
|
|
'conditions' => array('steps' => array('create'), 'traffic/limit' => 10),
|
|
|
@ -43,11 +42,11 @@ new ConfigurationTestGenerator(array(
|
|
|
|
'type' => 'False',
|
|
|
|
'type' => 'False',
|
|
|
|
'args' => array(
|
|
|
|
'args' => array(
|
|
|
|
'$this->_model->exists(Helper::getPasteId())',
|
|
|
|
'$this->_model->exists(Helper::getPasteId())',
|
|
|
|
'when discussions are enabled, but invalid flag posted, paste is not created'
|
|
|
|
'when discussions are enabled, but invalid flag posted, paste is not created',
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
'affects' => $vcud
|
|
|
|
'affects' => $vcud,
|
|
|
|
), array(
|
|
|
|
), array(
|
|
|
|
'setting' => false,
|
|
|
|
'setting' => false,
|
|
|
|
'tests' => array(
|
|
|
|
'tests' => array(
|
|
|
@ -56,11 +55,11 @@ new ConfigurationTestGenerator(array(
|
|
|
|
'args' => array(
|
|
|
|
'args' => array(
|
|
|
|
'#<div[^>]*id="opendisc"[^>]*>#',
|
|
|
|
'#<div[^>]*id="opendisc"[^>]*>#',
|
|
|
|
'$content',
|
|
|
|
'$content',
|
|
|
|
'outputs disabled discussion correctly'
|
|
|
|
'outputs disabled discussion correctly',
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
'affects' => $vrd
|
|
|
|
'affects' => $vrd,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
'main/opendiscussion' => array(
|
|
|
|
'main/opendiscussion' => array(
|
|
|
@ -73,11 +72,11 @@ new ConfigurationTestGenerator(array(
|
|
|
|
'args' => array(
|
|
|
|
'args' => array(
|
|
|
|
'#<input[^>]+id="opendiscussion"[^>]*checked="checked"[^>]*>#',
|
|
|
|
'#<input[^>]+id="opendiscussion"[^>]*checked="checked"[^>]*>#',
|
|
|
|
'$content',
|
|
|
|
'$content',
|
|
|
|
'outputs checked discussion correctly'
|
|
|
|
'outputs checked discussion correctly',
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
'affects' => $vrd
|
|
|
|
'affects' => $vrd,
|
|
|
|
), array(
|
|
|
|
), array(
|
|
|
|
'setting' => false,
|
|
|
|
'setting' => false,
|
|
|
|
'tests' => array(
|
|
|
|
'tests' => array(
|
|
|
@ -87,11 +86,11 @@ new ConfigurationTestGenerator(array(
|
|
|
|
'args' => array(
|
|
|
|
'args' => array(
|
|
|
|
'#<input[^>]+id="opendiscussion"[^>]*checked="checked"[^>]*>#',
|
|
|
|
'#<input[^>]+id="opendiscussion"[^>]*checked="checked"[^>]*>#',
|
|
|
|
'$content',
|
|
|
|
'$content',
|
|
|
|
'outputs unchecked discussion correctly'
|
|
|
|
'outputs unchecked discussion correctly',
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
'affects' => $vrd
|
|
|
|
'affects' => $vrd,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
'main/burnafterreadingselected' => array(
|
|
|
|
'main/burnafterreadingselected' => array(
|
|
|
@ -132,11 +131,11 @@ new ConfigurationTestGenerator(array(
|
|
|
|
'args' => array(
|
|
|
|
'args' => array(
|
|
|
|
'#<div[^>]*id="password"[^>]*>#',
|
|
|
|
'#<div[^>]*id="password"[^>]*>#',
|
|
|
|
'$content',
|
|
|
|
'$content',
|
|
|
|
'outputs password input correctly'
|
|
|
|
'outputs password input correctly',
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
'affects' => $vrd
|
|
|
|
'affects' => $vrd,
|
|
|
|
), array(
|
|
|
|
), array(
|
|
|
|
'setting' => false,
|
|
|
|
'setting' => false,
|
|
|
|
'tests' => array(
|
|
|
|
'tests' => array(
|
|
|
@ -146,11 +145,11 @@ new ConfigurationTestGenerator(array(
|
|
|
|
'args' => array(
|
|
|
|
'args' => array(
|
|
|
|
'#<div[^>]*id="password"[^>]*>#',
|
|
|
|
'#<div[^>]*id="password"[^>]*>#',
|
|
|
|
'$content',
|
|
|
|
'$content',
|
|
|
|
'removes password input correctly'
|
|
|
|
'removes password input correctly',
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
'affects' => $vrd
|
|
|
|
'affects' => $vrd,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
'main/template' => array(
|
|
|
|
'main/template' => array(
|
|
|
@ -206,11 +205,11 @@ new ConfigurationTestGenerator(array(
|
|
|
|
'args' => array(
|
|
|
|
'args' => array(
|
|
|
|
1,
|
|
|
|
1,
|
|
|
|
'$response["status"]',
|
|
|
|
'$response["status"]',
|
|
|
|
'when sizelimit limit exceeded, fail to create paste'
|
|
|
|
'when sizelimit limit exceeded, fail to create paste',
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
'affects' => array('create')
|
|
|
|
'affects' => array('create'),
|
|
|
|
), array(
|
|
|
|
), array(
|
|
|
|
'setting' => 2097152,
|
|
|
|
'setting' => 2097152,
|
|
|
|
'tests' => array(
|
|
|
|
'tests' => array(
|
|
|
@ -221,7 +220,7 @@ new ConfigurationTestGenerator(array(
|
|
|
|
'args' => array(
|
|
|
|
'args' => array(
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
'$response["status"]',
|
|
|
|
'$response["status"]',
|
|
|
|
'when sizelimit limit is not reached, successfully create paste'
|
|
|
|
'when sizelimit limit is not reached, successfully create paste',
|
|
|
|
),
|
|
|
|
),
|
|
|
|
), array(
|
|
|
|
), array(
|
|
|
|
'conditions' => array('steps' => array('create'), 'traffic/limit' => 0, 'main/burnafterreadingselected' => true),
|
|
|
|
'conditions' => array('steps' => array('create'), 'traffic/limit' => 0, 'main/burnafterreadingselected' => true),
|
|
|
@ -229,11 +228,11 @@ new ConfigurationTestGenerator(array(
|
|
|
|
'type' => 'True',
|
|
|
|
'type' => 'True',
|
|
|
|
'args' => array(
|
|
|
|
'args' => array(
|
|
|
|
'$this->_model->exists($response["id"])',
|
|
|
|
'$this->_model->exists($response["id"])',
|
|
|
|
'when sizelimit limit is not reached, paste exists after posting data'
|
|
|
|
'when sizelimit limit is not reached, paste exists after posting data',
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
'affects' => array('create')
|
|
|
|
'affects' => array('create'),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
'traffic/limit' => array(
|
|
|
|
'traffic/limit' => array(
|
|
|
@ -246,18 +245,18 @@ new ConfigurationTestGenerator(array(
|
|
|
|
'args' => array(
|
|
|
|
'args' => array(
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
'$response["status"]',
|
|
|
|
'$response["status"]',
|
|
|
|
'when traffic limit is disabled, successfully create paste'
|
|
|
|
'when traffic limit is disabled, successfully create paste',
|
|
|
|
),
|
|
|
|
),
|
|
|
|
), array(
|
|
|
|
), array(
|
|
|
|
'conditions' => array('steps' => array('create'), 'main/sizelimit' => 2097152),
|
|
|
|
'conditions' => array('steps' => array('create'), 'main/sizelimit' => 2097152),
|
|
|
|
'type' => 'True',
|
|
|
|
'type' => 'True',
|
|
|
|
'args' => array(
|
|
|
|
'args' => array(
|
|
|
|
'$this->_model->exists($response["id"])',
|
|
|
|
'$this->_model->exists($response["id"])',
|
|
|
|
'when traffic limit is disabled, paste exists after posting data'
|
|
|
|
'when traffic limit is disabled, paste exists after posting data',
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
'affects' => array('create')
|
|
|
|
'affects' => array('create'),
|
|
|
|
), array(
|
|
|
|
), array(
|
|
|
|
'setting' => 10,
|
|
|
|
'setting' => 10,
|
|
|
|
'tests' => array(
|
|
|
|
'tests' => array(
|
|
|
@ -267,11 +266,11 @@ new ConfigurationTestGenerator(array(
|
|
|
|
'args' => array(
|
|
|
|
'args' => array(
|
|
|
|
1,
|
|
|
|
1,
|
|
|
|
'$response["status"]',
|
|
|
|
'$response["status"]',
|
|
|
|
'when traffic limit is on and we do not wait, fail to create paste'
|
|
|
|
'when traffic limit is on and we do not wait, fail to create paste',
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
'affects' => array('create')
|
|
|
|
'affects' => array('create'),
|
|
|
|
), array(
|
|
|
|
), array(
|
|
|
|
'setting' => 2,
|
|
|
|
'setting' => 2,
|
|
|
|
'tests' => array(
|
|
|
|
'tests' => array(
|
|
|
@ -282,7 +281,7 @@ new ConfigurationTestGenerator(array(
|
|
|
|
'args' => array(
|
|
|
|
'args' => array(
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
'$response["status"]',
|
|
|
|
'$response["status"]',
|
|
|
|
'when traffic limit is on and we wait, successfully create paste'
|
|
|
|
'when traffic limit is on and we wait, successfully create paste',
|
|
|
|
),
|
|
|
|
),
|
|
|
|
), array(
|
|
|
|
), array(
|
|
|
|
'conditions' => array('steps' => array('create'), 'main/sizelimit' => 2097152),
|
|
|
|
'conditions' => array('steps' => array('create'), 'main/sizelimit' => 2097152),
|
|
|
@ -290,11 +289,11 @@ new ConfigurationTestGenerator(array(
|
|
|
|
'type' => 'True',
|
|
|
|
'type' => 'True',
|
|
|
|
'args' => array(
|
|
|
|
'args' => array(
|
|
|
|
'$this->_model->exists($response["id"])',
|
|
|
|
'$this->_model->exists($response["id"])',
|
|
|
|
'when traffic limit is on and we wait, paste exists after posting data'
|
|
|
|
'when traffic limit is on and we wait, paste exists after posting data',
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
'affects' => array('create')
|
|
|
|
'affects' => array('create'),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
));
|
|
|
|
));
|
|
|
@ -325,7 +324,7 @@ class ConfigurationTestGenerator
|
|
|
|
* @var array
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
private $_configurations = array(
|
|
|
|
private $_configurations = array(
|
|
|
|
array('options' => array(), 'tests' => array(), 'affects' => array())
|
|
|
|
array('options' => array(), 'tests' => array(), 'affects' => array()),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|