diff options
author | andy wharmby <wharmby@php.net> | 2009-08-27 12:21:19 +0000 |
---|---|---|
committer | andy wharmby <wharmby@php.net> | 2009-08-27 12:21:19 +0000 |
commit | 39fd3a2b3cfc7eb85c2e4addd0c825c1603fca95 (patch) | |
tree | 15bbb641fadb4d262c5adba66b3f4a025d1dd28e /ext/posix | |
parent | 17a419157508b8c8221e8381408e849831606f1f (diff) | |
download | php-git-39fd3a2b3cfc7eb85c2e4addd0c825c1603fca95.tar.gz |
Fix tests. Add missing SKIPIF sections so test do not run when POSIX extension not available.
Diffstat (limited to 'ext/posix')
-rw-r--r-- | ext/posix/tests/posix_setgid_basic.phpt | 7 | ||||
-rw-r--r-- | ext/posix/tests/posix_setgid_error.phpt | 6 | ||||
-rw-r--r-- | ext/posix/tests/posix_setgid_variation1.phpt | 6 | ||||
-rw-r--r-- | ext/posix/tests/posix_setgid_variation2.phpt | 7 | ||||
-rw-r--r-- | ext/posix/tests/posix_setgid_variation4.phpt | 7 | ||||
-rw-r--r-- | ext/posix/tests/posix_setgid_variation5.phpt | 7 | ||||
-rw-r--r-- | ext/posix/tests/posix_setgid_variation6.phpt | 7 |
7 files changed, 47 insertions, 0 deletions
diff --git a/ext/posix/tests/posix_setgid_basic.phpt b/ext/posix/tests/posix_setgid_basic.phpt index 5762d2b13c..da3751fea4 100644 --- a/ext/posix/tests/posix_setgid_basic.phpt +++ b/ext/posix/tests/posix_setgid_basic.phpt @@ -1,5 +1,9 @@ --TEST-- Test function posix_setgid() by calling it with its expected arguments +--SKIPIF-- +<?php + if(!extension_loaded("posix")) print "skip - POSIX extension not loaded"; +?> --CREDITS-- Marco Fabbri mrfabbri@gmail.com Francesco Fullone ff@ideato.it @@ -15,6 +19,9 @@ var_dump(posix_setgid( $gid ) ); ?> +===DONE=== --EXPECTF-- *** Test by calling method or function with its expected arguments *** bool(true) +===DONE=== +
\ No newline at end of file diff --git a/ext/posix/tests/posix_setgid_error.phpt b/ext/posix/tests/posix_setgid_error.phpt index 121b0403c8..247435d948 100644 --- a/ext/posix/tests/posix_setgid_error.phpt +++ b/ext/posix/tests/posix_setgid_error.phpt @@ -1,6 +1,10 @@ --TEST-- Test function posix_setgid() by calling it more than or less than its expected arguments. --CREDITS-- +--SKIPIF-- +<?php + if(!extension_loaded("posix")) print "skip - POSIX extension not loaded"; +?> Marco Fabbri mrfabbri@gmail.com Francesco Fullone ff@ideato.it #PHPTestFest Cesena Italia on 2009-06-20 @@ -17,6 +21,7 @@ var_dump(posix_setgid( $gid, $extra_arg ) ); var_dump(posix_setgid( ) ); ?> +===DONE=== --EXPECTF-- *** Test by calling method or function with incorrect numbers of arguments *** @@ -25,3 +30,4 @@ bool(false) Warning: posix_setgid() expects exactly 1 parameter, 0 given in %s on line %d bool(false) +===DONE=== diff --git a/ext/posix/tests/posix_setgid_variation1.phpt b/ext/posix/tests/posix_setgid_variation1.phpt index 9125327aa9..3690a7718c 100644 --- a/ext/posix/tests/posix_setgid_variation1.phpt +++ b/ext/posix/tests/posix_setgid_variation1.phpt @@ -1,5 +1,9 @@ --TEST-- Test function posix_setgid() by substituting argument 1 with array values. +--SKIPIF-- +<?php + if(!extension_loaded("posix")) print "skip - POSIX extension not loaded"; +?> --CREDITS-- Marco Fabbri mrfabbri@gmail.com Francesco Fullone ff@ideato.it @@ -25,6 +29,7 @@ foreach ( $variation_array as $var ) { var_dump(posix_setgid( $var ) ); } ?> +===DONE=== --EXPECTF-- *** Test substituting argument 1 with array values *** @@ -39,3 +44,4 @@ bool(false) Warning: posix_setgid() expects parameter 1 to be long, array given in %s on line %d bool(false) +===DONE=== diff --git a/ext/posix/tests/posix_setgid_variation2.phpt b/ext/posix/tests/posix_setgid_variation2.phpt index 77d614f05c..6d53b08377 100644 --- a/ext/posix/tests/posix_setgid_variation2.phpt +++ b/ext/posix/tests/posix_setgid_variation2.phpt @@ -1,5 +1,9 @@ --TEST-- Test function posix_setgid() by substituting argument 1 with boolean values. +--SKIPIF-- +<?php + if(!extension_loaded("posix")) print "skip - POSIX extension not loaded"; +?> --CREDITS-- Marco Fabbri mrfabbri@gmail.com Francesco Fullone ff@ideato.it @@ -24,9 +28,12 @@ foreach ( $variation_array as $var ) { var_dump(posix_setgid( $var ) ); } ?> +===DONE=== --EXPECTF-- *** Test substituting argument 1 with boolean values *** bool(false) bool(false) bool(false) bool(false) +===DONE=== +
\ No newline at end of file diff --git a/ext/posix/tests/posix_setgid_variation4.phpt b/ext/posix/tests/posix_setgid_variation4.phpt index 62acf23f39..2bd209bd3d 100644 --- a/ext/posix/tests/posix_setgid_variation4.phpt +++ b/ext/posix/tests/posix_setgid_variation4.phpt @@ -1,5 +1,9 @@ --TEST-- Test function posix_setgid() by substituting argument 1 with float values. +--SKIPIF-- +<?php + if(!extension_loaded("posix")) print "skip - POSIX extension not loaded"; +?> --CREDITS-- Marco Fabbri mrfabbri@gmail.com Francesco Fullone ff@ideato.it @@ -25,6 +29,7 @@ foreach ( $variation_array as $var ) { var_dump(posix_setgid( $var ) ); } ?> +===DONE=== --EXPECTF-- *** Test substituting argument 1 with float values *** bool(false) @@ -32,3 +37,5 @@ bool(false) bool(false) bool(false) bool(false) +===DONE=== +
\ No newline at end of file diff --git a/ext/posix/tests/posix_setgid_variation5.phpt b/ext/posix/tests/posix_setgid_variation5.phpt index f7e60a4a84..91f2bb593c 100644 --- a/ext/posix/tests/posix_setgid_variation5.phpt +++ b/ext/posix/tests/posix_setgid_variation5.phpt @@ -1,5 +1,9 @@ --TEST-- Test function posix_setgid() by substituting argument 1 with int values. +--SKIPIF-- +<?php + if(!extension_loaded("posix")) print "skip - POSIX extension not loaded"; +?> --CREDITS-- Marco Fabbri mrfabbri@gmail.com Francesco Fullone ff@ideato.it @@ -23,8 +27,11 @@ foreach ( $variation_array as $var ) { var_dump(posix_setgid( $var ) ); } ?> +===DONE=== --EXPECTF-- *** Test substituting argument 1 with int values *** bool(false) bool(false) bool(false) +===DONE=== +
\ No newline at end of file diff --git a/ext/posix/tests/posix_setgid_variation6.phpt b/ext/posix/tests/posix_setgid_variation6.phpt index e1bdfb131a..8557fd2e80 100644 --- a/ext/posix/tests/posix_setgid_variation6.phpt +++ b/ext/posix/tests/posix_setgid_variation6.phpt @@ -1,5 +1,9 @@ --TEST-- Test function posix_setgid() by substituting argument 1 with object values. +--SKIPIF-- +<?php + if(!extension_loaded("posix")) print "skip - POSIX extension not loaded"; +?> --CREDITS-- Marco Fabbri mrfabbri@gmail.com Francesco Fullone ff@ideato.it @@ -43,9 +47,12 @@ foreach ( $variation_array as $var ) { var_dump(posix_setgid( $var ) ); } ?> +===DONE=== --EXPECTF-- *** Test substituting argument 1 with object values *** Error: 2 - posix_setgid() expects parameter 1 to be long, object given, %s bool(false) Error: 2 - posix_setgid() expects parameter 1 to be long, object given, %s bool(false) +===DONE=== +
\ No newline at end of file |