summaryrefslogtreecommitdiff
path: root/ext/zlib/tests/compress_zlib_wrapper.phpt
blob: 1d11722129d638c79b55a330bc2fdee6291ae033 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--TEST--
compress.zlib:// wrapper
--SKIPIF--
<?php if (!extension_loaded("zlib")) die("skip"); ?>
--FILE--
<?php
chdir(__DIR__. "/../../..");

$pfx = str_repeat('../', substr_count($_SERVER['PHP_SELF'], '../'));

// Relative path
$fp = fopen("compress.zlib://{$pfx}ext/xsl/tests/xslt.xsl.gz", "rb");
fclose($fp);

// Absolute path
$fp = fopen("compress.zlib://". __DIR__. "/../../../ext/xsl/tests/xslt.xsl.gz", "rb");
fclose($fp);

echo "ok\n";
?>
--EXPECT--
ok