com php-src: Fix test to conform with UVS changes: tests/classe s/method_call_variation_001.phpt

From: Date: Fri, 15 Aug 2014 16:31:54 +0000
Subject: com php-src: Fix test to conform with UVS changes: tests/classe s/method_call_variation_001.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-80890@lists.php.net to get a copy of this message
Commit: f7e5308f4b0a5a47c3edf80e14d37768d30213d8 Author: Nikita Popov <nikic@php.net> Fri, 15 Aug 2014 18:31:54 +0200 Parents: 7d8383149a9dbecff992351e43bc7beee43767d8 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f7e5308f4b0a5a47c3edf80e14d37768d30213d8 Log: Fix test to conform with UVS changes Changed paths: M tests/classes/method_call_variation_001.phpt Diff: diff --git a/tests/classes/method_call_variation_001.phpt b/tests/classes/method_call_variation_001.phpt index dd43cfd..7950b7d 100644 --- a/tests/classes/method_call_variation_001.phpt +++ b/tests/classes/method_call_variation_001.phpt @@ -1,37 +1,27 @@ --TEST-- -In $a->$b[Y](), $b[Y] represents a method name on $a. But in $a->X[Y](), $a->X[Y] represents a global function name. +In $a->$b[Y]() and $a->X[Y]() both $a->$b[Y] and $a->X[Y] represent a global function name --FILE-- <?php - class C - { - function foo($a, $b) - { - echo "Called C::foo($a, $b)\n"; - } - } - - $c = new C; - - $functions[0] = 'foo'; - $functions[1][2][3][4] = 'foo'; - - $c->$functions[0](1, 2); - $c->$functions[1][2][3][4](3, 4); - - - function foo($a, $b) - { + class C {} + + function foo($a, $b) { echo "Called global foo($a, $b)\n"; } - + + $name = 'functions'; + + $c = new C; $c->functions[0] = 'foo'; $c->functions[1][2][3][4] = 'foo'; + $c->$name[0](1, 2); + $c->$name[1][2][3][4](3, 4); + $c->functions[0](5, 6); $c->functions[1][2][3][4](7, 8); ?> --EXPECTF-- -Called C::foo(1, 2) -Called C::foo(3, 4) +Called global foo(1, 2) +Called global foo(3, 4) Called global foo(5, 6) Called global foo(7, 8)

« previous php.cvs (#80890) next »