summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xext/reflection/tests/007.phpt70
1 files changed, 70 insertions, 0 deletions
diff --git a/ext/reflection/tests/007.phpt b/ext/reflection/tests/007.phpt
index 004158ccff..cb734182f1 100755
--- a/ext/reflection/tests/007.phpt
+++ b/ext/reflection/tests/007.phpt
@@ -158,3 +158,73 @@ object(WithCtorWithArgs)#%d (0) {
}
===DONE===
+--UEXPECTF--
+====>Class_does_not_exist
+__autoload(Class_does_not_exist)
+unicode(41) "Class Class_does_not_exist does not exist"
+====>NoCtor
+====>newInstance()
+object(NoCtor)#%d (0) {
+}
+====>newInstance(25)
+unicode(86) "Class NoCtor does not have a constructor, so you cannot pass any constructor arguments"
+====>newInstance(25, 42)
+unicode(86) "Class NoCtor does not have a constructor, so you cannot pass any constructor arguments"
+
+====>WithCtor
+====>newInstance()
+WithCtor::__construct()
+array(0) {
+}
+object(WithCtor)#%d (0) {
+}
+====>newInstance(25)
+WithCtor::__construct()
+array(1) {
+ [0]=>
+ int(25)
+}
+object(WithCtor)#%d (0) {
+}
+====>newInstance(25, 42)
+WithCtor::__construct()
+array(2) {
+ [0]=>
+ int(25)
+ [1]=>
+ int(42)
+}
+object(WithCtor)#%d (0) {
+}
+
+====>WithCtorWithArgs
+====>newInstance()
+
+Warning: Missing argument 1 for WithCtorWithArgs::__construct() in %s007.php on line %d
+
+Notice: Undefined variable: arg in %s007.php on line %d
+WithCtorWithArgs::__construct()
+array(0) {
+}
+object(WithCtorWithArgs)#%d (0) {
+}
+====>newInstance(25)
+WithCtorWithArgs::__construct(25)
+array(1) {
+ [0]=>
+ int(25)
+}
+object(WithCtorWithArgs)#%d (0) {
+}
+====>newInstance(25, 42)
+WithCtorWithArgs::__construct(25)
+array(2) {
+ [0]=>
+ int(25)
+ [1]=>
+ int(42)
+}
+object(WithCtorWithArgs)#%d (0) {
+}
+
+===DONE===