Expected Test Failure Report for Zend/tests/bug48770_3.phpt ('Bug #48770 (call_user_func_array() fails to call parent from inheriting class)')
Script
1:
<?php 2: 3: class A { 4: public function func($str) { 5: var_dump(__METHOD__ .': '. $str); 6: } 7: private function func2($str) { 8: var_dump(__METHOD__ .': '. $str); 9: } 10: protected function func3($str) { 11: var_dump(__METHOD__ .': '. $str); 12: } 13: private function func22($str) { 14: var_dump(__METHOD__ .': '. $str); 15: } 16: } 17: 18: class B extends A { 19: public function func($str) { 20: call_user_func_array(array($this, 'self::func2'), array($str)); 21: call_user_func_array(array($this, 'self::func3'), array($str)); 22: call_user_func_array(array($this, 'self::inexistent'), array($str)); 23: } 24: private function func2($str) { 25: var_dump(__METHOD__ .': '. $str); 26: } 27: protected function func3($str) { 28: var_dump(__METHOD__ .': '. $str); 29: } 30: } 31: 32: class C extends B { 33: public function func($str) { 34: parent::func($str); 35: } 36: } 37: 38: $c = new C; 39: $c->func('This should work!'); 40: 41: ?> 42:
Expected
%unicode|string%(27) "B::func2: This should work!"
%unicode|string%(27) "B::func3: This should work!"
Warning: call_user_func_array() expects parameter 1 to be a valid callback, class 'B' does not have a method 'inexistent' in %s on line %d
Output
string(27) "B::func2: This should work!"
string(27) "B::func3: This should work!"
Warning: call_user_func_array() expects parameter 1 to be a valid callback, class 'C' does not have a method 'inexistent' in /var/php_gcov/PHP_5_4/Zend/tests/bug48770_3.php on line 22
Diff
004+ Warning: call_user_func_array() expects parameter 1 to be a valid callback, class 'C' does not have a method 'inexistent' in /var/php_gcov/PHP_5_4/Zend/tests/bug48770_3.php on line 22
004- Warning: call_user_func_array() expects parameter 1 to be a valid callback, class 'B' does not have a method 'inexistent' in %s on line %d
Generated at Mon, 13 May 2013 22:40:14 +0000 (5 days ago)
|