summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--_test/cases/inc/parser/parser_preformatted.test.php51
1 files changed, 2 insertions, 49 deletions
diff --git a/_test/cases/inc/parser/parser_preformatted.test.php b/_test/cases/inc/parser/parser_preformatted.test.php
index df5980b59..3891a7b3c 100644
--- a/_test/cases/inc/parser/parser_preformatted.test.php
+++ b/_test/cases/inc/parser/parser_preformatted.test.php
@@ -175,10 +175,8 @@ class TestOfDoku_Parser_Preformatted extends TestOfDoku_Parser {
$this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls);
}
- // test with PHP allowed
+ // test for php
function testPHP() {
- global $conf;
- $conf['phpok'] = 1;
$this->P->addMode('php',new Doku_Parser_Mode_PHP());
$this->P->parse('Foo <php>testing</php> Bar');
@@ -194,31 +192,8 @@ class TestOfDoku_Parser_Preformatted extends TestOfDoku_Parser {
$this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls);
}
- // test with PHP forbidden
- function testPHPno() {
- global $conf;
- $conf['phpok'] = 0;
-
- $this->P->addMode('php',new Doku_Parser_Mode_PHP());
- $this->P->parse('Foo <php>testing</php> Bar');
- $calls = array (
- array('document_start',array()),
- array('p_open',array()),
- array('cdata',array("\n".'Foo ')),
- array('p_close',array()),
- array('file',array('testing')),
- array('p_open',array()),
- array('cdata',array(' Bar'."\n")),
- array('p_close',array()),
- array('document_end',array()),
- );
- $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls);
- }
-
- // test with HTML allowed
+ // test with for HTML
function testHTML() {
- global $conf;
- $conf['htmlok'] = 1;
$this->P->addMode('html',new Doku_Parser_Mode_HTML());
$this->P->parse('Foo <html>testing</html> Bar');
@@ -234,28 +209,6 @@ class TestOfDoku_Parser_Preformatted extends TestOfDoku_Parser {
$this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls);
}
- // test with HTML forbidden
- function testHTMLno() {
- global $conf;
- $conf['htmlok'] = 0;
-
- $this->P->addMode('html',new Doku_Parser_Mode_HTML());
- $this->P->parse('Foo <html>testing</html> Bar');
- $calls = array (
- array('document_start',array()),
- array('p_open',array()),
- array('cdata',array("\n".'Foo ')),
- array('p_close',array()),
- array('file',array('testing')),
- array('p_open',array()),
- array('cdata',array(' Bar'."\n")),
- array('p_close',array()),
- array('document_end',array()),
- );
- $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls);
- }
-
-
function testPreformattedPlusHeaderAndEol() {