summaryrefslogtreecommitdiff
path: root/ext/posix/tests
diff options
context:
space:
mode:
authorAlexey Zakhlestin <indeyets@php.net>2008-07-04 14:30:36 +0000
committerAlexey Zakhlestin <indeyets@php.net>2008-07-04 14:30:36 +0000
commit8e46482aace6895101496d5105ed7704d5c29ef1 (patch)
treea31658a90cc33e52a981f18a1f051ab94065d1ec /ext/posix/tests
parent026d7fe2321041f2304b29b9b9fffb4137dcbadd (diff)
downloadphp-git-8e46482aace6895101496d5105ed7704d5c29ef1.tar.gz
fixed tests not to rely on actual strings of errors, as those are not defined by any standard and are platform-dependent
Diffstat (limited to 'ext/posix/tests')
-rw-r--r--ext/posix/tests/posix_strerror_error.phpt4
-rw-r--r--ext/posix/tests/posix_strerror_variation1.phpt46
2 files changed, 25 insertions, 25 deletions
diff --git a/ext/posix/tests/posix_strerror_error.phpt b/ext/posix/tests/posix_strerror_error.phpt
index 6fc17ec0ce..3803f465b2 100644
--- a/ext/posix/tests/posix_strerror_error.phpt
+++ b/ext/posix/tests/posix_strerror_error.phpt
@@ -24,7 +24,7 @@ var_dump( posix_strerror($errno, $extra_arg) );
echo "\n-- Testing posix_strerror() function with invalid error number --\n";
$errno = -999;
-var_dump( posix_strerror($errno) );
+echo gettype( posix_strerror($errno) )."\n";
echo "Done";
?>
@@ -42,5 +42,5 @@ Warning: posix_strerror() expects exactly 1 parameter, 2 given in %s on line %d
bool(false)
-- Testing posix_strerror() function with invalid error number --
-string(%d) "Unknown error %d"
+string
Done
diff --git a/ext/posix/tests/posix_strerror_variation1.phpt b/ext/posix/tests/posix_strerror_variation1.phpt
index 40cfab2aad..6417078eb5 100644
--- a/ext/posix/tests/posix_strerror_variation1.phpt
+++ b/ext/posix/tests/posix_strerror_variation1.phpt
@@ -73,7 +73,7 @@ $values = array(
foreach($values as $value) {
echo "\nArg value $value \n";
- var_dump( posix_strerror($value) );
+ echo gettype( posix_strerror($value) )."\n";
};
echo "Done";
@@ -86,87 +86,87 @@ Notice: Undefined variable: undefined_var in %s on line %d
Notice: Undefined variable: unset_var in %s on line %d
Arg value 10.5
-string(18) "No child processes"
+string
Arg value -10.5
-string(%d) "Unknown error %d"
+string
Arg value 101234567000
-string(%d) "Unknown error %d"
+string
Arg value 1.07654321E-9
-string(7) "Success"
+string
Arg value 0.5
-string(7) "Success"
+string
Arg value Array
Warning: posix_strerror() expects parameter 1 to be long, array given in %s on line %d
-bool(false)
+boolean
Arg value Array
Warning: posix_strerror() expects parameter 1 to be long, array given in %s on line %d
-bool(false)
+boolean
Arg value Array
Warning: posix_strerror() expects parameter 1 to be long, array given in %s on line %d
-bool(false)
+boolean
Arg value Array
Warning: posix_strerror() expects parameter 1 to be long, array given in %s on line %d
-bool(false)
+boolean
Arg value Array
Warning: posix_strerror() expects parameter 1 to be long, array given in %s on line %d
-bool(false)
+boolean
Arg value
-string(7) "Success"
+string
Arg value
-string(7) "Success"
+string
Arg value 1
-string(23) "Operation not permitted"
+string
Arg value
-string(7) "Success"
+string
Arg value 1
-string(23) "Operation not permitted"
+string
Arg value
-string(7) "Success"
+string
Arg value
Warning: posix_strerror() expects parameter 1 to be long, string given in %s on line %d
-bool(false)
+boolean
Arg value
Warning: posix_strerror() expects parameter 1 to be long, string given in %s on line %d
-bool(false)
+boolean
Arg value string
Warning: posix_strerror() expects parameter 1 to be long, string given in %s on line %d
-bool(false)
+boolean
Arg value string
Warning: posix_strerror() expects parameter 1 to be long, string given in %s on line %d
-bool(false)
+boolean
Arg value
-string(7) "Success"
+string
Arg value
-string(7) "Success"
+string
Catchable fatal error: Object of class stdClass could not be converted to string in %s on line %d