Permalink
Browse files

fix tests

  • Loading branch information...
1 parent 0c6d903 commit dc6f073ce957ce2fe211fdd2a133ff0f22cb6752 @smalyshev smalyshev committed Feb 19, 2013
@@ -35,18 +35,30 @@ Notice: Undefined variable: x in %sbug52041.php on line 3
Warning: Creating default object from empty value in %sbug52041.php on line 8
+Notice: Undefined property: a in %sbug52041.php on line 8
+
Notice: Undefined variable: x in %sbug52041.php on line 3
+Notice: Undefined property: a in %sbug52041.php on line 9
+
Warning: Creating default object from empty value in %sbug52041.php on line 9
+Notice: Undefined property: b in %sbug52041.php on line 9
+
Notice: Undefined variable: x in %sbug52041.php on line 3
Warning: Creating default object from empty value in %sbug52041.php on line 10
+Notice: Undefined property: a in %sbug52041.php on line 10
+
Notice: Undefined variable: x in %sbug52041.php on line 3
+Notice: Undefined property: a in %sbug52041.php on line 11
+
Warning: Creating default object from empty value in %sbug52041.php on line 11
+Notice: Undefined property: b in %sbug52041.php on line 11
+
Notice: Undefined variable: x in %sbug52041.php on line 3
Notice: Undefined variable: x in %sbug52041.php on line 3
@@ -3,23 +3,25 @@ Bug #60536 (Traits Segfault)
--FILE--
<?php
trait T { private $x = 0; }
-class X {
+class X {
use T;
}
class Y extends X {
use T;
function x() {
- return ++$this->x;
+ return ++$this->x;
}
}
class Z extends Y {
function z() {
- return ++$this->x;
+ return ++$this->x;
}
}
$a = new Z();
$a->x();
echo "DONE";
?>
--EXPECTF--
+
+Notice: Undefined property: x in %s on line 14
DONE
@@ -9,6 +9,8 @@ function add_points($player, $points) {
add_points(NULL, 2);
--EXPECTF--
Warning: Creating default object from empty value in %sbug62005.php on line %d
+
+Notice: Undefined property: energy in %sbug62005.php on line 3
stdClass Object
(
[energy] => 2
@@ -20,7 +20,7 @@ foreach($c as $name => $value) {
echo "\n --> Attempting implicit conversion to object using increment...\n";
$c->$name->prop++;
$c->$name = $value; // reset value in case implicit conversion was successful
-
+
echo "\n --> Attempting implicit conversion to object using assignment...\n";
$c->$name->prop = "Implicit instantiation!";
$c->$name = $value; // reset value in case implicit conversion was successful
@@ -41,6 +41,8 @@ var_dump($c);
Warning: Creating default object from empty value in %s on line 18
+Notice: Undefined property: prop in %s on line 18
+
--> Attempting implicit conversion to object using assignment...
Warning: Creating default object from empty value in %s on line 22
@@ -49,12 +51,16 @@ Warning: Creating default object from empty value in %s on line 22
Warning: Creating default object from empty value in %s on line 26
+Notice: Undefined property: prop in %s on line 26
+
---( $c->emptyString )---
--> Attempting implicit conversion to object using increment...
Warning: Creating default object from empty value in %s on line 18
+Notice: Undefined property: prop in %s on line 18
+
--> Attempting implicit conversion to object using assignment...
Warning: Creating default object from empty value in %s on line 22
@@ -63,12 +69,16 @@ Warning: Creating default object from empty value in %s on line 22
Warning: Creating default object from empty value in %s on line 26
+Notice: Undefined property: prop in %s on line 26
+
---( $c->null )---
--> Attempting implicit conversion to object using increment...
Warning: Creating default object from empty value in %s on line 18
+Notice: Undefined property: prop in %s on line 18
+
--> Attempting implicit conversion to object using assignment...
Warning: Creating default object from empty value in %s on line 22
@@ -77,6 +87,8 @@ Warning: Creating default object from empty value in %s on line 22
Warning: Creating default object from empty value in %s on line 26
+Notice: Undefined property: prop in %s on line 26
+
---( $c->boolTrue )---
--> Attempting implicit conversion to object using increment...

0 comments on commit dc6f073

Please sign in to comment.