diff options
author | Marcus Boerger <helly@php.net> | 2002-10-29 21:57:51 +0000 |
---|---|---|
committer | Marcus Boerger <helly@php.net> | 2002-10-29 21:57:51 +0000 |
commit | 8c95cefac6db0ec18002e9c46b55895c584c8c07 (patch) | |
tree | 29d2502023f929bb5ad2ef9777f1426045ee2cf2 /ext/xslt | |
parent | 6663f2cd0abee2863ce93ce1e0f46d0104008ad1 (diff) | |
download | php-git-8c95cefac6db0ec18002e9c46b55895c584c8c07.tar.gz |
-add reason to --SKIPIF--
-add magic_quotes_runtime to --INI--
--use var_dump()
Diffstat (limited to 'ext/xslt')
-rw-r--r-- | ext/xslt/tests/xslt_process-001.phpt | 4 | ||||
-rw-r--r-- | ext/xslt/tests/xslt_set_object.phpt | 4 | ||||
-rw-r--r-- | ext/xslt/tests/xslt_setopt.phpt | 41 |
3 files changed, 33 insertions, 16 deletions
diff --git a/ext/xslt/tests/xslt_process-001.phpt b/ext/xslt/tests/xslt_process-001.phpt index 935c7c273d..15f9cae262 100644 --- a/ext/xslt/tests/xslt_process-001.phpt +++ b/ext/xslt/tests/xslt_process-001.phpt @@ -4,9 +4,11 @@ Various ways to provide xml and xslt arguments and params <?php include("skipif.inc"); if(!function_exists('utf8_encode')) { - die("skip\n"); + die("skip function utf8_encode() not available"); } ?> +--INI-- +magic_quotes_runtime=0 --FILE-- <?php error_reporting(E_ALL); diff --git a/ext/xslt/tests/xslt_set_object.phpt b/ext/xslt/tests/xslt_set_object.phpt index a7e8b3d6d7..fdc0291a4d 100644 --- a/ext/xslt/tests/xslt_set_object.phpt +++ b/ext/xslt/tests/xslt_set_object.phpt @@ -4,9 +4,11 @@ xslt_set_object function <?php include("skipif.inc"); if(!function_exists('xslt_set_object')) { - die("skip\n"); + die("skip function xslt_set_object() not available"); } ?> +--INI-- +magic_quotes_runtime=0 --FILE-- <?php error_reporting(E_ALL); diff --git a/ext/xslt/tests/xslt_setopt.phpt b/ext/xslt/tests/xslt_setopt.phpt index 15371294ea..0ed34f58a1 100644 --- a/ext/xslt/tests/xslt_setopt.phpt +++ b/ext/xslt/tests/xslt_setopt.phpt @@ -4,14 +4,16 @@ xslt_set_opt function and public entities <?php include("skipif.inc"); if(!function_exists('xslt_setopt')) { - die("skip\n"); + die("skip function xslt_setopt() is not available\n"); } ?> +--INI-- +magic_quotes_runtime=0 --FILE-- <?php error_reporting(E_ALL); -$xmlfile = 'ext/xslt/tests/public.xml'; -$xslfile = 'ext/xslt/tests/args.xsl'; +$xmlfile = dirname(__FILE__).'/public.xml'; +$xslfile = dirname(__FILE__).'/args.xsl'; $xh = xslt_create(); // Tell Sablotron to process public entities @@ -26,22 +28,33 @@ $xslstring = str_replace('<xsl:value-of select="." />', '<html><head><title>foo< // DEBUG: print $xslstring; xslt_setopt($xh, XSLT_SABOPT_PARSE_PUBLIC_ENTITIES | XSLT_SABOPT_DISABLE_ADDING_META); -$result_nometa = xslt_process($xh, $xmlfile, 'arg:/_xsl', NULL, array('/_xsl' => $xslstring)); -// DEBUG: print "$result_nometa\n"; +var_dump(xslt_process($xh, $xmlfile, 'arg:/_xsl', NULL, array('/_xsl' => $xslstring))); + xslt_setopt($xh, XSLT_SABOPT_PARSE_PUBLIC_ENTITIES); -$result_meta = xslt_process($xh, $xmlfile, 'arg:/_xsl', NULL, array('/_xsl' => $xslstring)); +var_dump(xslt_process($xh, $xmlfile, 'arg:/_xsl', NULL, array('/_xsl' => $xslstring))); // DEBUG: print "$result_meta\n"; -/* Also test if they're equal. That would mean, that disable-adding-meta is set to off - at compile time and our call to xslt_setopt failed to reset that */ -if($result_meta != $result_nometa && FALSE === stristr($result_nometa, '<meta http-equiv="Content-Type"')) -{ - print "OK\n"; -} - xslt_free($xh); ?> --EXPECT-- PHP QA® -OK +string(95) "<html> + <head> + <title>foo</title> + </head> + <body> + <p>PHP QA®</p> + </body> +</html> +" +string(172) "<html> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> + <title>foo</title> + </head> + <body> + <p>PHP QA®</p> + </body> +</html> +"
\ No newline at end of file |