summaryrefslogtreecommitdiff
path: root/ext/xslt/tests/xslt_getopt.phpt
blob: a00a875fac1b2ad428033da277134beb5c5ff35d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
--TEST--
xslt_getopt function
--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