summaryrefslogtreecommitdiff
path: root/_test
diff options
context:
space:
mode:
authorChris Smith <chris@jalakai.co.uk>2008-02-23 07:31:45 +0100
committerChris Smith <chris@jalakai.co.uk>2008-02-23 07:31:45 +0100
commitf342ae92e0880da9d8a88123be054e597b2a7beb (patch)
tree1ddd7fbd5333025dc0d00e5722ac2ccbcf130496 /_test
parent045b6b7a7cc53868b35f930a5f7891b854c27148 (diff)
downloadrpg-f342ae92e0880da9d8a88123be054e597b2a7beb.tar.gz
rpg-f342ae92e0880da9d8a88123be054e597b2a7beb.tar.bz2
Update php & html tests in preformatted test file to reflect changes in parser
This test file examines the handler. The decisions on htmlok & phpok settings have been moved from the handler to the renderer changing the nature of the test that can be carried out on these syntax modes in this file. Refer other patch adding xhtml renderer tests for 'phpok' & 'htmlok' and their associated syntax modes in parser_preformatted.test.php darcs-hash:20080223063145-d26fc-3b449c7bd36f52fd278528f05c5df04f1df86771.gz
Diffstat (limited to '_test')
-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() {