]> granicus.if.org Git - php/commitdiff
Add test for xslt_getopt
authorMelvyn Sopacua <msopacua@php.net>
Thu, 31 Oct 2002 21:09:05 +0000 (21:09 +0000)
committerMelvyn Sopacua <msopacua@php.net>
Thu, 31 Oct 2002 21:09:05 +0000 (21:09 +0000)
# see next commit

ext/xslt/tests/xslt_getopt.phpt [new file with mode: 0644]

diff --git a/ext/xslt/tests/xslt_getopt.phpt b/ext/xslt/tests/xslt_getopt.phpt
new file mode 100644 (file)
index 0000000..efec5e3
--- /dev/null
@@ -0,0 +1,37 @@
+--TEST--
+xslt_getopt function and public entities
+--SKIPIF--
+<?php
+include("skipif.inc");
+if(!function_exists('xslt_getopt')) {
+       die("skip\n");
+}
+?>
+--FILE--
+<?php
+error_reporting(E_ALL);
+
+$xh = xslt_create();
+xslt_setopt($xh, XSLT_SABOPT_PARSE_PUBLIC_ENTITIES);
+if(xslt_getopt($xh) == XSLT_SABOPT_PARSE_PUBLIC_ENTITIES)
+       print("OK\n");
+else
+       var_dump(xslt_getopt($xh));
+
+xslt_setopt($xh, XSLT_SABOPT_PARSE_PUBLIC_ENTITIES | XSLT_SABOPT_DISABLE_ADDING_META);
+if(xslt_getopt($xh) == XSLT_SABOPT_PARSE_PUBLIC_ENTITIES | XSLT_SABOPT_DISABLE_ADDING_META)
+       print("OK\n");
+else
+       var_dump(xslt_getopt($xh));
+
+xslt_setopt($xh, xslt_getopt($xh) | XSLT_OPT_SILENT);
+if(xslt_getopt($xh) == XSLT_SABOPT_PARSE_PUBLIC_ENTITIES | XSLT_SABOPT_DISABLE_ADDING_META | XSLT_OPT_SILENT)
+       print("OK\n");
+else
+       var_dump(xslt_getopt($xh));
+xslt_free($xh);
+?>
+--EXPECT--
+OK
+OK
+OK