summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandy wharmby <wharmby@php.net>2009-08-27 12:21:19 +0000
committerandy wharmby <wharmby@php.net>2009-08-27 12:21:19 +0000
commit9ea28dd3656a477cadc0dcd24ad2fbd7d78dae53 (patch)
tree09ee5eb770499386f67552be1d52ef5739a2d91c
parente71fee906e24130518b9a52394e57e8f668920af (diff)
downloadphp-git-9ea28dd3656a477cadc0dcd24ad2fbd7d78dae53.tar.gz
Fix tests. Add missing SKIPIF sections so test do not run when POSIX extension not available.
-rw-r--r--ext/posix/tests/posix_setgid_basic.phpt7
-rw-r--r--ext/posix/tests/posix_setgid_error.phpt6
-rw-r--r--ext/posix/tests/posix_setgid_variation1.phpt6
-rw-r--r--ext/posix/tests/posix_setgid_variation2.phpt7
-rw-r--r--ext/posix/tests/posix_setgid_variation4.phpt7
-rw-r--r--ext/posix/tests/posix_setgid_variation5.phpt7
-rw-r--r--ext/posix/tests/posix_setgid_variation6.phpt7
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