summaryrefslogtreecommitdiff
path: root/ext/reflection/tests
diff options
context:
space:
mode:
Diffstat (limited to 'ext/reflection/tests')
-rw-r--r--ext/reflection/tests/008.phpt6
-rw-r--r--ext/reflection/tests/ReflectionClass_implementsInterface_001.phpt6
-rw-r--r--ext/reflection/tests/ReflectionClass_isSubclassOf_002.phpt4
-rw-r--r--ext/reflection/tests/ReflectionMethod_constructor_error1.phpt8
-rw-r--r--ext/reflection/tests/ReflectionMethod_constructor_error2.phpt2
-rw-r--r--ext/reflection/tests/ReflectionObject_isSubclassOf.002.phpt4
-rw-r--r--ext/reflection/tests/ReflectionParameter_invalidMethodInConstructor.phpt2
-rw-r--r--ext/reflection/tests/ReflectionProperty_constructor_error.phpt2
-rw-r--r--ext/reflection/tests/ReflectionReference_errors.phpt2
9 files changed, 18 insertions, 18 deletions
diff --git a/ext/reflection/tests/008.phpt b/ext/reflection/tests/008.phpt
index 10806b0015..0b9a867884 100644
--- a/ext/reflection/tests/008.phpt
+++ b/ext/reflection/tests/008.phpt
@@ -27,13 +27,13 @@ foreach ($a as $key=>$val) {
echo "Done\n";
?>
--EXPECT--
-string(20) "Invalid method name "
-string(21) "Invalid method name 1"
+string(91) "ReflectionMethod::__construct(): Argument #1 ($class_or_method) must be a valid method name"
+string(91) "ReflectionMethod::__construct(): Argument #1 ($class_or_method) must be a valid method name"
string(21) "Class does not exist"
string(22) "Class a does not exist"
string(21) "Class does not exist"
string(22) "Class a does not exist"
string(21) "Class does not exist"
-string(66) "The parameter class is expected to be either a string or an object"
+string(104) "ReflectionMethod::__construct(): Argument #1 ($class_or_method) must be of type object|string, int given"
string(21) "Class does not exist"
Done
diff --git a/ext/reflection/tests/ReflectionClass_implementsInterface_001.phpt b/ext/reflection/tests/ReflectionClass_implementsInterface_001.phpt
index 7f28198dfa..d912b568e8 100644
--- a/ext/reflection/tests/ReflectionClass_implementsInterface_001.phpt
+++ b/ext/reflection/tests/ReflectionClass_implementsInterface_001.phpt
@@ -65,7 +65,7 @@ try {
echo $e->getMessage() . "\n";
}
?>
---EXPECTF--
+--EXPECT--
Does A implement A?
- Using object argument: A is not an interface
- Using string argument: A is not an interface
@@ -146,6 +146,6 @@ Does I2 implement I2?
Test bad arguments:
ReflectionClass::implementsInterface() expects exactly 1 parameter, 0 given
ReflectionClass::implementsInterface() expects exactly 1 parameter, 2 given
-Parameter one must either be a string or a ReflectionClass object
+ReflectionClass::implementsInterface(): Argument #1 ($interface) must be of type ReflectionClass|string, null given
Interface ThisClassDoesNotExist does not exist
-Parameter one must either be a string or a ReflectionClass object
+ReflectionClass::implementsInterface(): Argument #1 ($interface) must be of type ReflectionClass|string, int given
diff --git a/ext/reflection/tests/ReflectionClass_isSubclassOf_002.phpt b/ext/reflection/tests/ReflectionClass_isSubclassOf_002.phpt
index b86b70018d..6d4ae500a9 100644
--- a/ext/reflection/tests/ReflectionClass_isSubclassOf_002.phpt
+++ b/ext/reflection/tests/ReflectionClass_isSubclassOf_002.phpt
@@ -39,6 +39,6 @@ try {
Test bad arguments:
ReflectionClass::isSubclassOf() expects exactly 1 parameter, 0 given
ReflectionClass::isSubclassOf() expects exactly 1 parameter, 2 given
-Parameter one must either be a string or a ReflectionClass object
+ReflectionClass::isSubclassOf(): Argument #1 ($class) must be of type ReflectionClass|string, null given
Class ThisClassDoesNotExist does not exist
-Parameter one must either be a string or a ReflectionClass object
+ReflectionClass::isSubclassOf(): Argument #1 ($class) must be of type ReflectionClass|string, int given
diff --git a/ext/reflection/tests/ReflectionMethod_constructor_error1.phpt b/ext/reflection/tests/ReflectionMethod_constructor_error1.phpt
index 186c61b2b0..391beced52 100644
--- a/ext/reflection/tests/ReflectionMethod_constructor_error1.phpt
+++ b/ext/reflection/tests/ReflectionMethod_constructor_error1.phpt
@@ -65,17 +65,17 @@ try {
?>
--EXPECTF--
Wrong type of argument (bool):
-ReflectionException: Invalid method name 1 in %s
+ReflectionException: ReflectionMethod::__construct(): Argument #1 ($class_or_method) must be a valid method name in %s:%d
Stack trace:
#0 %s ReflectionMethod->__construct('1')
#1 {main}
Wrong type of argument (int):
-ReflectionException: Invalid method name 3 in %s
+ReflectionException: ReflectionMethod::__construct(): Argument #1 ($class_or_method) must be a valid method name in %s:%d
Stack trace:
#0 %s ReflectionMethod->__construct('3')
#1 {main}
Wrong type of argument (bool, string):
-ReflectionException: The parameter class is expected to be either a string or an object in %s
+ReflectionException: ReflectionMethod::__construct(): Argument #1 ($class_or_method) must be of type object|string, bool given in %s:%d
Stack trace:
#0 %s ReflectionMethod->__construct(true, 'foo')
#1 {main}
@@ -85,7 +85,7 @@ Stack trace:
#0 %s ReflectionMethod->__construct('TestClass', '1')
#1 {main}
No method given:
-ReflectionException: Invalid method name TestClass in %s
+ReflectionException: ReflectionMethod::__construct(): Argument #1 ($class_or_method) must be a valid method name in %s:%d
Stack trace:
#0 %s ReflectionMethod->__construct('TestClass')
#1 {main}
diff --git a/ext/reflection/tests/ReflectionMethod_constructor_error2.phpt b/ext/reflection/tests/ReflectionMethod_constructor_error2.phpt
index d84fa5dcff..cf0d3bbbaa 100644
--- a/ext/reflection/tests/ReflectionMethod_constructor_error2.phpt
+++ b/ext/reflection/tests/ReflectionMethod_constructor_error2.phpt
@@ -57,5 +57,5 @@ Ok - ReflectionMethod::__construct() expects exactly 1 parameter, 0 given
Too many arguments:
Ok - ReflectionMethod::__construct() expects exactly 1 parameter, 3 given
Ok - Class InvalidClassName does not exist
-Ok - The parameter class is expected to be either a string or an object
+Ok - ReflectionMethod::__construct(): Argument #1 ($class_or_method) must be of type object|string, array given
Ok - ReflectionMethod::__construct() expects exactly 1 parameter, 2 given
diff --git a/ext/reflection/tests/ReflectionObject_isSubclassOf.002.phpt b/ext/reflection/tests/ReflectionObject_isSubclassOf.002.phpt
index 5cebd43016..30f769aa3d 100644
--- a/ext/reflection/tests/ReflectionObject_isSubclassOf.002.phpt
+++ b/ext/reflection/tests/ReflectionObject_isSubclassOf.002.phpt
@@ -39,6 +39,6 @@ try {
Test bad arguments:
ReflectionClass::isSubclassOf() expects exactly 1 parameter, 0 given
ReflectionClass::isSubclassOf() expects exactly 1 parameter, 2 given
-Parameter one must either be a string or a ReflectionClass object
+ReflectionClass::isSubclassOf(): Argument #1 ($class) must be of type ReflectionClass|string, null given
Class ThisClassDoesNotExist does not exist
-Parameter one must either be a string or a ReflectionClass object
+ReflectionClass::isSubclassOf(): Argument #1 ($class) must be of type ReflectionClass|string, int given
diff --git a/ext/reflection/tests/ReflectionParameter_invalidMethodInConstructor.phpt b/ext/reflection/tests/ReflectionParameter_invalidMethodInConstructor.phpt
index ee6ae86cba..fd83e30aaa 100644
--- a/ext/reflection/tests/ReflectionParameter_invalidMethodInConstructor.phpt
+++ b/ext/reflection/tests/ReflectionParameter_invalidMethodInConstructor.phpt
@@ -44,5 +44,5 @@ Class A does not exist
Method C::b() does not exist
Method C::b() does not exist
Ok - ReflectionParameter::__construct() expects exactly 2 parameters, 1 given
-Ok - The parameter class is expected to be either a string, an array(class, method) or a callable object
+Ok - ReflectionParameter::__construct(): Argument #1 ($function) must be either a string, an array(class, method) or a callable object, int given
Done.
diff --git a/ext/reflection/tests/ReflectionProperty_constructor_error.phpt b/ext/reflection/tests/ReflectionProperty_constructor_error.phpt
index 38a34681db..a2df954309 100644
--- a/ext/reflection/tests/ReflectionProperty_constructor_error.phpt
+++ b/ext/reflection/tests/ReflectionProperty_constructor_error.phpt
@@ -38,7 +38,7 @@ Non-existent class:
Class NonExistentClass does not exist
Wrong property parameter type:
-The parameter class is expected to be either a string or an object
+ReflectionProperty::__construct(): Argument #1 ($class) must be of type object|string, int given
Non-existent property:
Property TestClass::$nonExistentProperty does not exist
diff --git a/ext/reflection/tests/ReflectionReference_errors.phpt b/ext/reflection/tests/ReflectionReference_errors.phpt
index 33154ba22e..88244b7940 100644
--- a/ext/reflection/tests/ReflectionReference_errors.phpt
+++ b/ext/reflection/tests/ReflectionReference_errors.phpt
@@ -42,7 +42,7 @@ var_dump(unserialize('O:19:"ReflectionReference":0:{}'));
--EXPECTF--
Call to private ReflectionReference::__construct() from invalid context
ReflectionReference::fromArrayElement(): Argument #1 ($array) must be of type array, object given
-Key must be array or string
+ReflectionReference::fromArrayElement(): Argument #2 ($key) must be of type string|int, float given
Array key not found
Serialization of 'ReflectionReference' is not allowed