summaryrefslogtreecommitdiff
path: root/ext/sysvshm
diff options
context:
space:
mode:
Diffstat (limited to 'ext/sysvshm')
-rw-r--r--ext/sysvshm/tests/001.phpt25
1 files changed, 16 insertions, 9 deletions
diff --git a/ext/sysvshm/tests/001.phpt b/ext/sysvshm/tests/001.phpt
index 106f6699ee..e9d00bc6dc 100644
--- a/ext/sysvshm/tests/001.phpt
+++ b/ext/sysvshm/tests/001.phpt
@@ -7,13 +7,24 @@ if (!function_exists('ftok')){ print 'skip'; }
?>
--FILE--
<?php
+
+try {
+ ftok("","");
+} catch (\ValueError $e) {
+ echo $e->getMessage() . \PHP_EOL;
+}
+
try {
- var_dump(ftok("",""));
+ ftok(-1, -1);
+} catch (\ValueError $e) {
+ echo $e->getMessage() . \PHP_EOL;
+}
+
+try {
+ ftok("qwertyu","qwertyu");
} catch (\ValueError $e) {
echo $e->getMessage() . \PHP_EOL;
}
-var_dump(ftok(-1, -1));
-var_dump(ftok("qwertyu","qwertyu"));
var_dump(ftok("nonexistentfile","q"));
@@ -23,12 +34,8 @@ echo "Done\n";
?>
--EXPECTF--
ftok(): Argument #1 ($pathname) cannot be empty
-
-Warning: ftok(): Project identifier is invalid in %s on line %d
-int(-1)
-
-Warning: ftok(): Project identifier is invalid in %s on line %d
-int(-1)
+ftok(): Argument #2 ($proj) must be a single character
+ftok(): Argument #2 ($proj) must be a single character
Warning: ftok(): ftok() failed - No such file or directory in %s on line %d
int(-1)