Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
smalyshev committed Feb 19, 2013
1 parent 0c6d903 commit dc6f073
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 4 deletions.
12 changes: 12 additions & 0 deletions Zend/tests/bug52041.phpt
Expand Up @@ -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
Expand Down
8 changes: 5 additions & 3 deletions Zend/tests/bug60536_001.phpt
Expand Up @@ -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
2 changes: 2 additions & 0 deletions Zend/tests/bug62005.phpt
Expand Up @@ -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
Expand Down
14 changes: 13 additions & 1 deletion tests/classes/implicit_instantiation_001.phpt
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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...
Expand Down

0 comments on commit dc6f073

Please sign in to comment.