summaryrefslogtreecommitdiff
path: root/ext/bz2/tests
diff options
context:
space:
mode:
authorMáté Kocsis <kocsismate@woohoolabs.com>2020-03-18 22:44:02 +0100
committerMáté Kocsis <kocsismate@woohoolabs.com>2020-03-23 18:59:04 +0100
commit01b266aac405c3c4c677d46f348dc6b227b69f7f (patch)
treed1c68e09fa5f200542b2424c084bc25bb2a5397f /ext/bz2/tests
parentd7b73de8c9299ef1e7c55f22449dff3e0833f68e (diff)
downloadphp-git-01b266aac405c3c4c677d46f348dc6b227b69f7f.tar.gz
Improve error messages of various extensions
Closes GH-5278
Diffstat (limited to 'ext/bz2/tests')
-rw-r--r--ext/bz2/tests/002.phpt4
-rw-r--r--ext/bz2/tests/bzopen_string_filename_with_null_bytes.phpt8
2 files changed, 6 insertions, 6 deletions
diff --git a/ext/bz2/tests/002.phpt b/ext/bz2/tests/002.phpt
index 78c4a9bbdf..9a7f7f0855 100644
--- a/ext/bz2/tests/002.phpt
+++ b/ext/bz2/tests/002.phpt
@@ -91,10 +91,10 @@ resource(%d) of type (stream)
resource(%d) of type (stream)
Warning: fopen(bz_open_002.txt): Failed to open stream: Bad file %s in %s on line %d
-First parameter has to be string or file-resource
+bzopen(): Argument #1 ($file) must be of type string or file-resource, bool given
Warning: fopen(bz_open_002.txt): Failed to open stream: Bad file %s in %s on line %d
-First parameter has to be string or file-resource
+bzopen(): Argument #1 ($file) must be of type string or file-resource, bool given
Warning: bzopen(): cannot write to a stream opened in read only mode in %s on line %d
bool(false)
diff --git a/ext/bz2/tests/bzopen_string_filename_with_null_bytes.phpt b/ext/bz2/tests/bzopen_string_filename_with_null_bytes.phpt
index 9a05015bb9..1261981c6b 100644
--- a/ext/bz2/tests/bzopen_string_filename_with_null_bytes.phpt
+++ b/ext/bz2/tests/bzopen_string_filename_with_null_bytes.phpt
@@ -7,17 +7,17 @@ bzopen(): throw TypeError if filename contains null bytes
try {
bzopen("file\0", "w");
-} catch (\TypeError $e) {
+} catch (TypeError $e) {
echo $e->getMessage() . \PHP_EOL;
}
try {
bzopen("file\0", "r");
-} catch (\TypeError $e) {
+} catch (TypeError $e) {
echo $e->getMessage() . \PHP_EOL;
}
?>
--EXPECT--
-Filename must not contain null bytes
-Filename must not contain null bytes
+bzopen(): Argument #1 ($file) must not contain null bytes
+bzopen(): Argument #1 ($file) must not contain null bytes