summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHannes Magnusson <bjori@php.net>2011-09-07 12:05:19 +0000
committerHannes Magnusson <bjori@php.net>2011-09-07 12:05:19 +0000
commit04044dd07eb0f204639c457dc77d6cfd49f2572c (patch)
tree6e1b2d0843cf9067c775c5fb68784566a76badc3
parenta2252e527f10730bdd0f32170ebee6c6169ba729 (diff)
downloadphp-git-04044dd07eb0f204639c457dc77d6cfd49f2572c.tar.gz
Fix cleanup routines
-rw-r--r--ext/spl/tests/SplFileInfo_getGroup_basic.phpt4
-rw-r--r--ext/spl/tests/SplFileInfo_getOwner_basic.phpt4
-rw-r--r--ext/spl/tests/SplFileObject_fputcsv.phpt3
-rw-r--r--ext/standard/tests/file/bug55124.phpt2
-rw-r--r--ext/zip/tests/bug53885.phpt5
5 files changed, 12 insertions, 6 deletions
diff --git a/ext/spl/tests/SplFileInfo_getGroup_basic.phpt b/ext/spl/tests/SplFileInfo_getGroup_basic.phpt
index c5808c57d9..d279935637 100644
--- a/ext/spl/tests/SplFileInfo_getGroup_basic.phpt
+++ b/ext/spl/tests/SplFileInfo_getGroup_basic.phpt
@@ -10,7 +10,7 @@ Jacopo Romei <jacopo@sviluppoagile.it>
#Test Fest Cesena (Italy) on 2009-06-20
--FILE--
<?php
-$filename = basename(__FILE__, 'phpt').'tmp';
+$filename = __DIR__ . "/SplFileInfo_getGroup_basic";
touch($filename);
$fileInfo = new SplFileInfo($filename);
$expected = filegroup($filename);
@@ -19,7 +19,7 @@ var_dump($expected == $actual);
?>
--CLEAN--
<?php
-$filename = basename(__FILE__, 'phpt').'tmp';
+$filename = __DIR__ . "/SplFileInfo_getGroup_basic";
unlink($filename);
?>
--EXPECTF--
diff --git a/ext/spl/tests/SplFileInfo_getOwner_basic.phpt b/ext/spl/tests/SplFileInfo_getOwner_basic.phpt
index 790dcc69ba..3df8e4858b 100644
--- a/ext/spl/tests/SplFileInfo_getOwner_basic.phpt
+++ b/ext/spl/tests/SplFileInfo_getOwner_basic.phpt
@@ -10,7 +10,7 @@ Jacopo Romei <jacopo@sviluppoagile.it>
#Test Fest Cesena (Italy) on 2009-06-20
--FILE--
<?php
-$filename = basename(__FILE__, 'phpt').'tmp';
+$filename = __DIR__ . "/SplFileInfo_getOwner_basic";
touch($filename);
$fileInfo = new SplFileInfo($filename);
$expected = fileowner($filename);
@@ -19,7 +19,7 @@ var_dump($expected == $actual);
?>
--CLEAN--
<?php
-$filename = basename(__FILE__, 'phpt').'tmp';
+$filename = __DIR__ . "/SplFileInfo_getOwner_basic";
unlink($filename);
?>
--EXPECTF--
diff --git a/ext/spl/tests/SplFileObject_fputcsv.phpt b/ext/spl/tests/SplFileObject_fputcsv.phpt
index 2a42d57479..66fdbfd1b9 100644
--- a/ext/spl/tests/SplFileObject_fputcsv.phpt
+++ b/ext/spl/tests/SplFileObject_fputcsv.phpt
@@ -2,7 +2,7 @@
SplFileObject::fputcsv(): functionality tests
--FILE--
<?php
-$file = 'SplFileObject_fputcsv.csv';
+$file = __DIR__ . '/SplFileObject_fputcsv.csv';
$fo = new SplFileObject($file, 'w');
$list = array (
@@ -55,6 +55,7 @@ echo '$list = ';var_export($res);echo ";\n";
<?php exit(0); ?>
--CLEAN--
<?php
+$file = __DIR__ . '/SplFileObject_fputcsv.csv';
unlink($file);
?>
--EXPECT--
diff --git a/ext/standard/tests/file/bug55124.phpt b/ext/standard/tests/file/bug55124.phpt
index 892d4508d8..1915b7f209 100644
--- a/ext/standard/tests/file/bug55124.phpt
+++ b/ext/standard/tests/file/bug55124.phpt
@@ -8,7 +8,7 @@ mkdir('a/./b', 0755, true);
if (is_dir('a/b')) {
rmdir('a/b');
}
-if (is_dir('/a')) {
+if (is_dir('./a')) {
rmdir('a');
}
chdir($old_dir_path);
diff --git a/ext/zip/tests/bug53885.phpt b/ext/zip/tests/bug53885.phpt
index d59bf8f034..1b3fcb9e4b 100644
--- a/ext/zip/tests/bug53885.phpt
+++ b/ext/zip/tests/bug53885.phpt
@@ -15,5 +15,10 @@ $nx->locateName("a",ZIPARCHIVE::FL_UNCHANGED);
$nx->statName("a",ZIPARCHIVE::FL_UNCHANGED);
?>
==DONE==
+--CLEAN--
+<?php
+$fname = dirname(__FILE__)."/test53885.zip";
+unlink($fname);
+?>
--EXPECTF--
==DONE==