remove read tests, since that is now purely API based
This commit is contained in:
parent
f325ff7058
commit
911fb51734
@ -11,8 +11,8 @@
|
|||||||
*/
|
*/
|
||||||
include 'Bootstrap.php';
|
include 'Bootstrap.php';
|
||||||
|
|
||||||
$vrd = array('view', 'read', 'delete');
|
$vd = array('view', 'delete');
|
||||||
$vcud = array('view', 'create', 'read', 'delete');
|
$vcd = array('view', 'create', 'delete');
|
||||||
|
|
||||||
new ConfigurationTestGenerator(array(
|
new ConfigurationTestGenerator(array(
|
||||||
'main/discussion' => array(
|
'main/discussion' => array(
|
||||||
@ -20,10 +20,10 @@ new ConfigurationTestGenerator(array(
|
|||||||
'setting' => true,
|
'setting' => true,
|
||||||
'tests' => array(
|
'tests' => array(
|
||||||
array(
|
array(
|
||||||
'conditions' => array('steps' => $vrd),
|
'conditions' => array('steps' => $vd),
|
||||||
'type' => 'RegExp',
|
'type' => 'RegExp',
|
||||||
'args' => array(
|
'args' => array(
|
||||||
'#<div[^>]*id="opendisc"[^>]*>#',
|
'#<div[^>]*id="opendiscussionoption"[^>]*>#',
|
||||||
'$content',
|
'$content',
|
||||||
'outputs enabled discussion correctly',
|
'outputs enabled discussion correctly',
|
||||||
),
|
),
|
||||||
@ -46,20 +46,20 @@ new ConfigurationTestGenerator(array(
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
'affects' => $vcud,
|
'affects' => $vcd,
|
||||||
), array(
|
), array(
|
||||||
'setting' => false,
|
'setting' => false,
|
||||||
'tests' => array(
|
'tests' => array(
|
||||||
array(
|
array(
|
||||||
'type' => 'NotRegExp',
|
'type' => 'NotRegExp',
|
||||||
'args' => array(
|
'args' => array(
|
||||||
'#<div[^>]*id="opendisc"[^>]*>#',
|
'#<div[^>]*id="opendiscussionoption"[^>]*>#',
|
||||||
'$content',
|
'$content',
|
||||||
'outputs disabled discussion correctly',
|
'outputs disabled discussion correctly',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
'affects' => $vrd,
|
'affects' => $vd,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
'main/opendiscussion' => array(
|
'main/opendiscussion' => array(
|
||||||
@ -76,7 +76,7 @@ new ConfigurationTestGenerator(array(
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
'affects' => $vrd,
|
'affects' => $vd,
|
||||||
), array(
|
), array(
|
||||||
'setting' => false,
|
'setting' => false,
|
||||||
'tests' => array(
|
'tests' => array(
|
||||||
@ -90,7 +90,7 @@ new ConfigurationTestGenerator(array(
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
'affects' => $vrd,
|
'affects' => $vd,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
'main/burnafterreadingselected' => array(
|
'main/burnafterreadingselected' => array(
|
||||||
@ -135,7 +135,7 @@ new ConfigurationTestGenerator(array(
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
'affects' => $vrd,
|
'affects' => $vd,
|
||||||
), array(
|
), array(
|
||||||
'setting' => false,
|
'setting' => false,
|
||||||
'tests' => array(
|
'tests' => array(
|
||||||
@ -149,7 +149,7 @@ new ConfigurationTestGenerator(array(
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
'affects' => $vrd,
|
'affects' => $vd,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
'main/template' => array(
|
'main/template' => array(
|
||||||
@ -172,7 +172,7 @@ new ConfigurationTestGenerator(array(
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
'affects' => $vrd,
|
'affects' => $vd,
|
||||||
), array(
|
), array(
|
||||||
'setting' => 'bootstrap',
|
'setting' => 'bootstrap',
|
||||||
'tests' => array(
|
'tests' => array(
|
||||||
@ -192,7 +192,7 @@ new ConfigurationTestGenerator(array(
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
'affects' => $vrd,
|
'affects' => $vd,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
'main/sizelimit' => array(
|
'main/sizelimit' => array(
|
||||||
@ -507,6 +507,7 @@ EOT;
|
|||||||
$code .= PHP_EOL . <<<'EOT'
|
$code .= PHP_EOL . <<<'EOT'
|
||||||
$this->_model->create(Helper::getPasteId(), Helper::getPaste());
|
$this->_model->create(Helper::getPasteId(), Helper::getPaste());
|
||||||
$_SERVER['QUERY_STRING'] = Helper::getPasteId();
|
$_SERVER['QUERY_STRING'] = Helper::getPasteId();
|
||||||
|
$_SERVER['HTTP_X_REQUESTED_WITH'] = 'JSONHttpRequest';
|
||||||
EOT;
|
EOT;
|
||||||
break;
|
break;
|
||||||
case 'Delete':
|
case 'Delete':
|
||||||
@ -539,11 +540,10 @@ EOT;
|
|||||||
case 'Read':
|
case 'Read':
|
||||||
$code .= <<<'EOT'
|
$code .= <<<'EOT'
|
||||||
|
|
||||||
$this->assertContains(
|
$response = json_decode($content, true);
|
||||||
htmlspecialchars(json_encode(Helper::getPaste()['data']), ENT_NOQUOTES),
|
$this->assertEquals(0, $response['status'], 'outputs success status');
|
||||||
$content,
|
$this->assertEquals(Helper::getPasteId(), $response['id'], 'outputs id correctly');
|
||||||
'outputs data correctly'
|
$this->assertEquals(Helper::getPaste()['data'], $response['data'], 'outputs data correctly');
|
||||||
);
|
|
||||||
EOT;
|
EOT;
|
||||||
break;
|
break;
|
||||||
case 'Delete':
|
case 'Delete':
|
||||||
|
Loading…
Reference in New Issue
Block a user