summaryrefslogtreecommitdiff
path: root/tests/classes
diff options
context:
space:
mode:
Diffstat (limited to 'tests/classes')
-rw-r--r--tests/classes/constants_error_005.phpt3
-rw-r--r--tests/classes/interface_method.phpt2
-rw-r--r--tests/classes/method_call_variation_001.phpt36
3 files changed, 15 insertions, 26 deletions
diff --git a/tests/classes/constants_error_005.phpt b/tests/classes/constants_error_005.phpt
index 1283783de7..25f36460b7 100644
--- a/tests/classes/constants_error_005.phpt
+++ b/tests/classes/constants_error_005.phpt
@@ -8,5 +8,4 @@ Error case: class constant as an encapsed containing a variable
}
?>
--EXPECTF--
-
-Parse error: %s in %s on line %d
+Fatal error: Constant expression contains invalid operations in %s on line %d
diff --git a/tests/classes/interface_method.phpt b/tests/classes/interface_method.phpt
index 3570b35928..f80bd756f3 100644
--- a/tests/classes/interface_method.phpt
+++ b/tests/classes/interface_method.phpt
@@ -6,7 +6,7 @@ ZE2 An interface method must be abstract
<?php
interface if_a {
- function err() {};
+ function err() {}
}
?>
diff --git a/tests/classes/method_call_variation_001.phpt b/tests/classes/method_call_variation_001.phpt
index dd43cfd1cb..7950b7deb3 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)