summaryrefslogtreecommitdiff
path: root/ext/spl/tests/DirectoryIterator_getGroup_basic.phpt
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2011-08-19 10:22:38 +0200
committerOndřej Surý <ondrej@sury.org>2011-08-19 10:22:38 +0200
commitf452a2b3e4e4279b27594a8ddb66525442d59227 (patch)
treed05cb62c5515ada33076d3cc3e49b664733a478c /ext/spl/tests/DirectoryIterator_getGroup_basic.phpt
parent038ba12e8724d537040e88ec794354b0c063f0a6 (diff)
downloadphp-upstream/5.3.7.tar.gz
Imported Upstream version 5.3.7upstream/5.3.7
Diffstat (limited to 'ext/spl/tests/DirectoryIterator_getGroup_basic.phpt')
-rw-r--r--ext/spl/tests/DirectoryIterator_getGroup_basic.phpt20
1 files changed, 8 insertions, 12 deletions
diff --git a/ext/spl/tests/DirectoryIterator_getGroup_basic.phpt b/ext/spl/tests/DirectoryIterator_getGroup_basic.phpt
index 58387ccce..9cc9fadbe 100644
--- a/ext/spl/tests/DirectoryIterator_getGroup_basic.phpt
+++ b/ext/spl/tests/DirectoryIterator_getGroup_basic.phpt
@@ -8,23 +8,19 @@ Daniel Londero <daniel.londero@gmail.com>
Francesco Trucchia <ft@ideato.it>
Jacopo Romei <jacopo@sviluppoagile.it>
#Test Fest Cesena (Italy) on 2009-06-20
---SKIPIF--
-<?php
-if (substr(PHP_OS, 0, 3) == 'WIN') die("skip this test not for Windows platforms");
-?>
--FILE--
<?php
-
-shell_exec('mkdir test_dir_ptfi');
-$dir = new DirectoryIterator('test_dir_ptfi');
-$result = shell_exec('ls -lnd test_dir_ptfi | cut -d" " -f 4');
-
-var_dump($dir->getGroup() == $result);
-
+$dirname = 'DirectoryIterator_getGroup_basic';
+mkdir($dirname);
+$dir = new DirectoryIterator($dirname);
+$expected = filegroup($dirname);
+$actual = $dir->getGroup();
+var_dump($expected == $actual);
?>
--CLEAN--
<?php
-rmdir('test_dir_ptfi');
+$dirname = 'DirectoryIterator_getGroup_basic';
+rmdir($dirname);
?>
--EXPECTF--
bool(true)