diff options
author | Máté Kocsis <kocsismate@woohoolabs.com> | 2020-09-10 13:28:18 +0200 |
---|---|---|
committer | Máté Kocsis <kocsismate@woohoolabs.com> | 2020-09-15 14:26:16 +0200 |
commit | c37a1cd650a5399c4a89543759deedcc7280becd (patch) | |
tree | 3a36dcdb3a20042ce3f37b3b534cbc5fbec7d1d4 /ext/sysvshm | |
parent | 62c20c662a961f030178a15311bfe37591c10316 (diff) | |
download | php-git-c37a1cd650a5399c4a89543759deedcc7280becd.tar.gz |
Promote a few remaining errors in ext/standard
Closes GH-6110
Diffstat (limited to 'ext/sysvshm')
-rw-r--r-- | ext/sysvshm/tests/001.phpt | 25 |
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) |