Skip to content

Commit 397ee76

Browse files
committed
Make zlib include_path tests more robust
One file is placed inside the script directory, we need to make sure it has a unique name as well.
1 parent c02a593 commit 397ee76

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

ext/zlib/tests/gzfile_variation15.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ if (!extension_loaded("zlib")) {
88
?>
99
--FILE--
1010
<?php
11-
$thisTestDir = 'gzfile_variation15.dir';
11+
$testName = 'gzfile_variation15';
1212
require_once('reading_include_path.inc');
1313

1414
//define the files to go into these directories, create one in dir2

ext/zlib/tests/gzopen_variation4.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ if (!extension_loaded("zlib")) {
1616

1717
echo "*** Testing gzopen() : usage variation ***\n";
1818

19-
$thisTestDir = 'gzopen_variation4.dir';
19+
$testName = 'gzopen_variation4';
2020
require_once('reading_include_path.inc');
2121

2222
//define the files to go into these directories, create one in dir2

ext/zlib/tests/readgzfile_variation15.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ if (!extension_loaded("zlib")) {
88
?>
99
--FILE--
1010
<?php
11-
$thisTestDir = 'readgzfile_variation15.dir';
11+
$testName = 'readgzfile_variation15';
1212
require_once('reading_include_path.inc');
1313

1414
//define the files to go into these directories, create one in dir2

ext/zlib/tests/reading_include_path.inc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
<?php
2+
$thisTestDir = $testName . '.dir';
23
mkdir($thisTestDir);
34
chdir($thisTestDir);
45

56
//create the include directory structure
67
$workingDir = "workdir";
7-
$filename = "afile.txt.gz";
8+
$filename = $testName . ".txt.gz";
89
$scriptDir = dirname(__FILE__);
910
$baseDir = getcwd();
1011
$secondFile = $baseDir."/dir2/".$filename;

0 commit comments

Comments
 (0)