summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMelvyn Sopacua <msopacua@php.net>2002-10-31 21:09:05 +0000
committerMelvyn Sopacua <msopacua@php.net>2002-10-31 21:09:05 +0000
commitbcf61b073a72ba8d8b70641260bb669dd2adfab0 (patch)
tree7e5ca573ced01d6d6db86d99fbfb7bd880896663
parenta00abb68500ed4fa1d1df2cd761c7ec99ebefdb0 (diff)
downloadphp-git-bcf61b073a72ba8d8b70641260bb669dd2adfab0.tar.gz
Add test for xslt_getopt
# see next commit
-rw-r--r--ext/xslt/tests/xslt_getopt.phpt37
1 files changed, 37 insertions, 0 deletions
diff --git a/ext/xslt/tests/xslt_getopt.phpt b/ext/xslt/tests/xslt_getopt.phpt
new file mode 100644
index 0000000000..efec5e3ef9
--- /dev/null
+++ b/ext/xslt/tests/xslt_getopt.phpt
@@ -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