php-src/ext/zlib/tests/zlib_scheme_file_basic.phpt

38 lines
681 B
PHP

--TEST--
Test compress.zlib:// scheme with the file
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
print "skip - ZLIB extension not loaded";
}
?>
--FILE--
<?php
$inputFileName = dirname(__FILE__)."/004.txt.gz";
$srcFile = "compress.zlib://$inputFileName";
$contents = file($srcFile);
var_dump($contents);
?>
===DONE===
--EXPECT--
array(6) {
[0]=>
string(36) "When you're taught through feelings
"
[1]=>
string(26) "Destiny flying high above
"
[2]=>
string(38) "all I know is that you can realize it
"
[3]=>
string(18) "Destiny who cares
"
[4]=>
string(19) "as it turns around
"
[5]=>
string(39) "and I know that it descends down on me
"
}
===DONE===