From: Knut Urdalen Date: Sat, 25 Jun 2011 04:50:42 +0000 (+0000) Subject: fixed/refactored some spl tests related to owner/group retrieval X-Git-Tag: php-5.3.7RC2~17 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f8e21c395b901a301c3bc622435fc01d533d9768;p=php fixed/refactored some spl tests related to owner/group retrieval --- diff --git a/ext/spl/tests/DirectoryIterator_getGroup_basic.phpt b/ext/spl/tests/DirectoryIterator_getGroup_basic.phpt index 58387cccef..3573d85852 100644 --- a/ext/spl/tests/DirectoryIterator_getGroup_basic.phpt +++ b/ext/spl/tests/DirectoryIterator_getGroup_basic.phpt @@ -8,23 +8,19 @@ Daniel Londero Francesco Trucchia Jacopo Romei #Test Fest Cesena (Italy) on 2009-06-20 ---SKIPIF-- - --FILE-- getGroup() == $result); - +$dirname = basename(__FILE__, '.phpt'); +mkdir($dirname); +$dir = new DirectoryIterator($dirname); +$expected = filegroup($dirname); +$actual = $dir->getGroup(); +var_dump($expected == $actual); ?> --CLEAN-- --EXPECTF-- bool(true) diff --git a/ext/spl/tests/DirectoryIterator_getOwner_basic.phpt b/ext/spl/tests/DirectoryIterator_getOwner_basic.phpt index e342dcdb6f..f02cb6e04e 100644 --- a/ext/spl/tests/DirectoryIterator_getOwner_basic.phpt +++ b/ext/spl/tests/DirectoryIterator_getOwner_basic.phpt @@ -1,29 +1,26 @@ ---TEST-- -SPL: Spl Directory Iterator test getOwner ---CREDITS-- +--TEST-- +SPL: DirectoryIterator test getOwner +--CREDITS-- Cesare D'Amico Andrea Giorgini Filippo De Santis Daniel Londero Francesco Trucchia Jacopo Romei -#Test Fest Cesena (Italy) on 2009-06-20 ---SKIPIF-- - ---FILE-- -getOwner() == $result); - +#Test Fest Cesena (Italy) on 2009-06-20 +--FILE-- +getOwner(); +var_dump($expected == $actual); ?> --CLEAN-- ---EXPECTF-- +$dirname = basename(__FILE__, '.phpt'); +rmdir($dirname); +?> +--EXPECTF-- bool(true) diff --git a/ext/spl/tests/SplFileInfo_getGroup_basic.phpt b/ext/spl/tests/SplFileInfo_getGroup_basic.phpt index 7b0528d7d1..c5808c57d9 100644 --- a/ext/spl/tests/SplFileInfo_getGroup_basic.phpt +++ b/ext/spl/tests/SplFileInfo_getGroup_basic.phpt @@ -1,30 +1,26 @@ ---TEST-- -SPL: Spl File Info test getGroup ---CREDITS-- +--TEST-- +SPL: SplFileInfo test getGroup +--CREDITS-- Cesare D'Amico Andrea Giorgini Filippo De Santis Daniel Londero Francesco Trucchia Jacopo Romei -#Test Fest Cesena (Italy) on 2009-06-20 ---SKIPIF-- - ---FILE-- -getGroup() == $result); - +#Test Fest Cesena (Italy) on 2009-06-20 +--FILE-- +getGroup(); +var_dump($expected == $actual); ?> --CLEAN-- ---EXPECTF-- +$filename = basename(__FILE__, 'phpt').'tmp'; +unlink($filename); +?> +--EXPECTF-- bool(true) diff --git a/ext/spl/tests/SplFileInfo_getOwner_basic.phpt b/ext/spl/tests/SplFileInfo_getOwner_basic.phpt index 50f79430c9..790dcc69ba 100644 --- a/ext/spl/tests/SplFileInfo_getOwner_basic.phpt +++ b/ext/spl/tests/SplFileInfo_getOwner_basic.phpt @@ -1,30 +1,26 @@ ---TEST-- -SPL: Spl File Info test getOwner ---CREDITS-- +--TEST-- +SPL: SplFileInfo test getOwner +--CREDITS-- Cesare D'Amico Andrea Giorgini Filippo De Santis Daniel Londero Francesco Trucchia Jacopo Romei -#Test Fest Cesena (Italy) on 2009-06-20 ---SKIPIF-- - ---FILE-- -getOwner() == $result); - +#Test Fest Cesena (Italy) on 2009-06-20 +--FILE-- +getOwner(); +var_dump($expected == $actual); ?> --CLEAN-- ---EXPECTF-- +$filename = basename(__FILE__, 'phpt').'tmp'; +unlink($filename); +?> +--EXPECTF-- bool(true)