php-src/ext/zlib/tests/gzfile_variation12.phpt
Fabien Villepinte a555cc0b3d Clean DONE tags from tests
Remove most of the `===DONE===` tags and its variations.
Keep `===DONE===` if the test output otherwise becomes empty.

Closes GH-4872.
2019-11-07 21:31:47 +01:00

107 lines
1.7 KiB
PHP

--TEST--
Test function gzfile() by substituting argument 2 with int values.
--SKIPIF--
<?php
if (!extension_loaded('zlib')) die ('skip zlib extension not available in this build');
?>
--FILE--
<?php
$filename = __DIR__."/004.txt.gz";
$variation = array (
'int 0' => 0,
'int 1' => 1,
'int 12345' => 12345,
'int -12345' => -2345,
);
foreach ( $variation as $var ) {
var_dump(gzfile( $filename, $var ) );
}
?>
--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
"
}
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
"
}
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
"
}
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
"
}