summaryrefslogtreecommitdiff
path: root/Zend/tests/bug48770_3.phpt
diff options
context:
space:
mode:
authorAlex Dowad <alexinbeijing@gmail.com>2020-04-14 14:05:32 +0200
committerNikita Popov <nikita.ppv@gmail.com>2020-04-14 17:41:52 +0200
commit907bf786f1972dd88fe804ce7ff0cc183a719e0b (patch)
tree6c0bbf58df7ccfb576395755906274f731c4f141 /Zend/tests/bug48770_3.phpt
parent7a185b5d0a5949be2bd0baff3f4bc5eb65bfce03 (diff)
downloadphp-git-907bf786f1972dd88fe804ce7ff0cc183a719e0b.tar.gz
Remove XFAIL from tests for 'bug' 48770
Bug 48770 was opened due to conflicting expectations about the behavior of: call_user_func_array(array($this, 'parent::methodName'), array($arg1,$arg2)) The one reporting the 'bug' seemed to think that since the method name was prefixed with `parent::`, it should call the method in the superclass of the *class where this code appears*. However, `$this` might be an instance of a subclass. If so, then it is quite reasonable that `call_user_func_array` will call the method as defined in the superclass of *the receiver*. So the 'bug' is not really a bug. Therefore, there is no need for an XFAIL in the tests. They should just pass. Amend tests to reflect the actual expected behavior of `call_user_func_array`, not what the person who reported bug 48770 thought it should be. Closes GH-5386.
Diffstat (limited to 'Zend/tests/bug48770_3.phpt')
-rw-r--r--Zend/tests/bug48770_3.phpt7
1 files changed, 1 insertions, 6 deletions
diff --git a/Zend/tests/bug48770_3.phpt b/Zend/tests/bug48770_3.phpt
index 0ce0d69119..f2b537363b 100644
--- a/Zend/tests/bug48770_3.phpt
+++ b/Zend/tests/bug48770_3.phpt
@@ -1,7 +1,5 @@
--TEST--
Bug #48770 (call_user_func_array() fails to call parent from inheriting class)
---XFAIL--
-See Bug #48770
--FILE--
<?php
@@ -15,9 +13,6 @@ class A {
protected function func3($str) {
var_dump(__METHOD__ .': '. $str);
}
- private function func22($str) {
- var_dump(__METHOD__ .': '. $str);
- }
}
class B extends A {
@@ -52,4 +47,4 @@ $c->func('This should work!');
--EXPECT--
string(27) "B::func2: This should work!"
string(27) "B::func3: This should work!"
-call_user_func_array(): Argument #1 ($function) must be a valid callback, class 'B' does not have a method 'inexistent'
+call_user_func_array(): Argument #1 ($function) must be a valid callback, class 'C' does not have a method 'inexistent'