summaryrefslogtreecommitdiff
path: root/ext/phar/tests
diff options
context:
space:
mode:
authorMáté Kocsis <kocsismate@woohoolabs.com>2020-02-25 20:58:33 +0100
committerMáté Kocsis <kocsismate@woohoolabs.com>2020-02-26 15:00:08 +0100
commit960318ed95d17bd30c2896e2f3189ebffb965dce (patch)
tree2890972c266dabe649a44b540869a49e41a3e450 /ext/phar/tests
parentc7094d892639fedffb67c273f8fd44f3ffff86d6 (diff)
downloadphp-git-960318ed95d17bd30c2896e2f3189ebffb965dce.tar.gz
Change argument error message format
Closes GH-5211
Diffstat (limited to 'ext/phar/tests')
-rw-r--r--ext/phar/tests/badparameters.phpt36
-rw-r--r--ext/phar/tests/bug64931/bug64931.phpt2
-rw-r--r--ext/phar/tests/create_path_error.phpt2
-rw-r--r--ext/phar/tests/fgc_edgecases.phpt2
-rw-r--r--ext/phar/tests/fopen_edgecases2.phpt2
-rw-r--r--ext/phar/tests/opendir_edgecases.phpt2
-rw-r--r--ext/phar/tests/phar_extract.phpt2
-rw-r--r--ext/phar/tests/phar_oo_006.phpt2
-rw-r--r--ext/phar/tests/phar_unlinkarchive.phpt2
-rw-r--r--ext/phar/tests/pharfileinfo_construct.phpt2
10 files changed, 27 insertions, 27 deletions
diff --git a/ext/phar/tests/badparameters.phpt b/ext/phar/tests/badparameters.phpt
index e086e89c28..f2aee20828 100644
--- a/ext/phar/tests/badparameters.phpt
+++ b/ext/phar/tests/badparameters.phpt
@@ -228,40 +228,40 @@ try {
}
?>
--EXPECTF--
-Phar::mungServer() expects argument #1 ($munglist) to be of type array, string given
-Phar::createDefaultStub() expects argument #1 ($index) to be a valid path, array given
-Phar::loadPhar() expects argument #1 ($filename) to be a valid path, array given
-Phar::canCompress() expects argument #1 ($method) to be of type int, string given
-Phar::__construct() expects argument #1 ($filename) to be a valid path, array given
-Phar::convertToExecutable() expects argument #1 ($format) to be of type int, array given
-Phar::convertToData() expects argument #1 ($format) to be of type int, array given
-PharData::delete() expects argument #1 ($entry) to be a valid path, array given
+Phar::mungServer(): Argument #1 ($munglist) must be of type array, string given
+Phar::createDefaultStub(): Argument #1 ($index) must be a valid path, array given
+Phar::loadPhar(): Argument #1 ($filename) must be a valid path, array given
+Phar::canCompress(): Argument #1 ($method) must be of type int, string given
+Phar::__construct(): Argument #1 ($filename) must be a valid path, array given
+Phar::convertToExecutable(): Argument #1 ($format) must be of type int, array given
+Phar::convertToData(): Argument #1 ($format) must be of type int, array given
+PharData::delete(): Argument #1 ($entry) must be a valid path, array given
Cannot write out phar archive, phar is read-only
Entry oops does not exist and cannot be deleted
%sfrontcontroller10.phar
Cannot write out phar archive, phar is read-only
A Phar alias cannot be set in a plain tar archive
-Phar::setAlias() expects argument #1 ($alias) to be of type string, array given
+Phar::setAlias(): Argument #1 ($alias) must be of type string, array given
Cannot change stub, phar is read-only
A Phar stub cannot be set in a plain tar archive
-Phar::setStub() expects argument #1 ($newstub) to be of type string, array given
+Phar::setStub(): Argument #1 ($newstub) must be of type string, array given
A Phar stub cannot be set in a plain tar archive
-Phar::setDefaultStub() expects argument #1 ($index) to be of type string, array given
+Phar::setDefaultStub(): Argument #1 ($index) must be of type string, array given
Cannot change stub: phar.readonly=1
Cannot set signature algorithm, phar is read-only
-Phar::compress() expects argument #1 ($compression_type) to be of type int, array given
+Phar::compress(): Argument #1 ($compression_type) must be of type int, array given
Cannot compress phar archive, phar is read-only
-Phar::compressFiles() expects argument #1 ($compression_type) to be of type int, array given
+Phar::compressFiles(): Argument #1 ($compression_type) must be of type int, array given
Phar is readonly, cannot change compression
Phar::copy() expects exactly 2 parameters, 1 given
Cannot copy "a" to "b", phar is read-only
-Phar::offsetExists() expects argument #1 ($entry) to be a valid path, array given
-Phar::offsetGet() expects argument #1 ($entry) to be a valid path, array given
+Phar::offsetExists(): Argument #1 ($entry) must be a valid path, array given
+Phar::offsetGet(): Argument #1 ($entry) must be a valid path, array given
Phar::offsetSet() expects exactly 2 parameters, 1 given
-PharData::offsetUnset() expects argument #1 ($entry) to be a valid path, array given
+PharData::offsetUnset(): Argument #1 ($entry) must be a valid path, array given
Write operations disabled by the php.ini setting phar.readonly
-Phar::addEmptyDir() expects argument #1 ($dirname) to be a valid path, array given
-Phar::addFile() expects argument #1 ($filename) to be a valid path, array given
+Phar::addEmptyDir(): Argument #1 ($dirname) must be a valid path, array given
+Phar::addFile(): Argument #1 ($filename) must be a valid path, array given
Phar::addFromString() expects exactly 2 parameters, 1 given
Write operations disabled by the php.ini setting phar.readonly
Phar::setMetadata() expects exactly 1 parameter, 2 given
diff --git a/ext/phar/tests/bug64931/bug64931.phpt b/ext/phar/tests/bug64931/bug64931.phpt
index 8c25692c3f..2b4b17051e 100644
--- a/ext/phar/tests/bug64931/bug64931.phpt
+++ b/ext/phar/tests/bug64931/bug64931.phpt
@@ -53,4 +53,4 @@ CAUGHT: Cannot create any files in magic ".phar" directory
CAUGHT: Cannot create any files in magic ".phar" directory
CAUGHT: Cannot create any files in magic ".phar" directory
CAUGHT: Cannot create any files in magic ".phar" directory
-CAUGHT: Phar::addFromString() expects argument #1 ($localname) to be a valid path, string given
+CAUGHT: Phar::addFromString(): Argument #1 ($localname) must be a valid path, string given
diff --git a/ext/phar/tests/create_path_error.phpt b/ext/phar/tests/create_path_error.phpt
index 458ec8b6f5..ce0b8a59a2 100644
--- a/ext/phar/tests/create_path_error.phpt
+++ b/ext/phar/tests/create_path_error.phpt
@@ -78,4 +78,4 @@ string(5) "query"
11:Error: file_put_contents(phar://%s): Failed to open stream: phar error: invalid path "%s" contains illegal character
12:Error: file_put_contents(phar://%s): Failed to open stream: phar error: invalid path "%s" contains illegal character
13:Error: file_put_contents(phar://%s): Failed to open stream: phar error: invalid path "%s" contains illegal character
-Exception: Phar::offsetSet() expects argument #1 ($entry) to be a valid path, string given
+Exception: Phar::offsetSet(): Argument #1 ($entry) must be a valid path, string given
diff --git a/ext/phar/tests/fgc_edgecases.phpt b/ext/phar/tests/fgc_edgecases.phpt
index 861933ba4e..8f4b40c72b 100644
--- a/ext/phar/tests/fgc_edgecases.phpt
+++ b/ext/phar/tests/fgc_edgecases.phpt
@@ -49,7 +49,7 @@ include $pname . '/foo/hi';
<?php rmdir(__DIR__ . '/poo'); ?>
<?php unlink(__DIR__ . '/fgc_edgecases.txt'); ?>
--EXPECTF--
-file_get_contents() expects argument #1 ($filename) to be a valid path, array given
+file_get_contents(): Argument #1 ($filename) must be a valid path, array given
blah
<?php
echo file_get_contents("foo/" . basename(__FILE__));
diff --git a/ext/phar/tests/fopen_edgecases2.phpt b/ext/phar/tests/fopen_edgecases2.phpt
index 548f50a362..9d9b9feed9 100644
--- a/ext/phar/tests/fopen_edgecases2.phpt
+++ b/ext/phar/tests/fopen_edgecases2.phpt
@@ -38,7 +38,7 @@ include $pname . '/foo/hi';
<?php rmdir(__DIR__ . '/poo'); ?>
<?php unlink(__DIR__ . '/fopen_edgecases2.txt'); ?>
--EXPECTF--
-fopen() expects argument #1 ($filename) to be a valid path, array given
+fopen(): Argument #1 ($filename) must be a valid path, array given
blah
test
diff --git a/ext/phar/tests/opendir_edgecases.phpt b/ext/phar/tests/opendir_edgecases.phpt
index 59deca53c8..14f7f5dae0 100644
--- a/ext/phar/tests/opendir_edgecases.phpt
+++ b/ext/phar/tests/opendir_edgecases.phpt
@@ -55,7 +55,7 @@ include $pname . '/foo';
<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
<?php rmdir(__DIR__ . '/poo');
--EXPECTF--
-opendir() expects argument #1 ($path) to be a valid path, array given
+opendir(): Argument #1 ($path) must be a valid path, array given
.
..
foo
diff --git a/ext/phar/tests/phar_extract.phpt b/ext/phar/tests/phar_extract.phpt
index e5bba5d757..bbe95dec0d 100644
--- a/ext/phar/tests/phar_extract.phpt
+++ b/ext/phar/tests/phar_extract.phpt
@@ -142,7 +142,7 @@ string(3) "hi3"
string(3) "hi2"
bool(false)
Invalid argument, expected a filename (string) or array of filenames
-Phar::extractTo() expects argument #1 ($pathto) to be a valid path, array given
+Phar::extractTo(): Argument #1 ($pathto) must be a valid path, array given
Invalid argument, extraction path must be non-zero length
Unable to use path "%soops" for extraction, it is a file, must be a directory
Invalid argument, array of filenames to extract contains non-string value
diff --git a/ext/phar/tests/phar_oo_006.phpt b/ext/phar/tests/phar_oo_006.phpt
index 5de390600f..c050859b86 100644
--- a/ext/phar/tests/phar_oo_006.phpt
+++ b/ext/phar/tests/phar_oo_006.phpt
@@ -40,7 +40,7 @@ unlink(__DIR__ . '/files/phar_oo_006.phar.php');
__halt_compiler();
?>
--EXPECTF--
-SplFileInfo::setFileClass() expects argument #1 ($class_name) to be a class name derived from SplFileObject, 'SplFileInfo' given
+SplFileInfo::setFileClass(): Argument #1 ($class_name) must be a class name derived from SplFileObject, 'SplFileInfo' given
MyFile::__construct(phar://%s/a.php)
a.php
MyFile::__construct(phar://%s/b/c.php)
diff --git a/ext/phar/tests/phar_unlinkarchive.phpt b/ext/phar/tests/phar_unlinkarchive.phpt
index 70b251257d..5dc55ce487 100644
--- a/ext/phar/tests/phar_unlinkarchive.phpt
+++ b/ext/phar/tests/phar_unlinkarchive.phpt
@@ -92,7 +92,7 @@ __HALT_COMPILER();
Unknown phar archive ""
Unknown phar archive "%sphar_unlinkarchive.phar"
Unknown phar archive "%sphar_unlinkarchive.phar.tar": internal corruption of phar "%sphar_unlinkarchive.phar.tar" (truncated entry)
-Phar::unlinkArchive() expects argument #1 ($archive) to be a valid path, array given
+Phar::unlinkArchive(): Argument #1 ($archive) must be a valid path, array given
bool(false)
string(48) "<?php echo "first stub\n"; __HALT_COMPILER(); ?>"
phar archive "%sphar_unlinkarchive.phar" has open file handles or objects. fclose() all file handles, and unset() all objects prior to calling unlinkArchive()
diff --git a/ext/phar/tests/pharfileinfo_construct.phpt b/ext/phar/tests/pharfileinfo_construct.phpt
index 5ac63d82f5..5f22264423 100644
--- a/ext/phar/tests/pharfileinfo_construct.phpt
+++ b/ext/phar/tests/pharfileinfo_construct.phpt
@@ -49,7 +49,7 @@ echo $e->getMessage() . "\n";
<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar'); ?>
--EXPECTF--
Cannot open phar file 'phar://%spharfileinfo_construct.phar/oops': internal corruption of phar "%spharfileinfo_construct.phar" (truncated entry)
-PharFileInfo::__construct() expects argument #1 ($filename) to be a valid path, array given
+PharFileInfo::__construct(): Argument #1 ($filename) must be a valid path, array given
Cannot access phar file entry '%s' in archive '%s'
Cannot call constructor twice
'%s' is not a valid phar archive URL (must have at least phar://filename.phar)