com php-src: fix test [ci skip]: Zend/tests/type_declarations /typed_properties_027.phpt
| From: | Bob Weinand | Date: | Tue, 05 Apr 2016 09:31:00 +0000 |
| Subject: | com php-src: fix test [ci skip]: Zend/tests/type_declarations /typed_properties_027.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-95582@lists.php.net to get a copy of this message | ||
Commit: 7edbbaed974f896d355ffc461c12b70251392a45
Author: Joe Watkins <krakjoe@php.net> Tue, 5 Apr 2016 10:31:00 +0100
Parents: 7e02f5059b091cf2946b58c8a7dc9c47c63c7940
Branches: typed_ref_properties
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=7edbbaed974f896d355ffc461c12b70251392a45
Log:
fix test [ci skip]
Changed paths:
M Zend/tests/type_declarations/typed_properties_027.phpt
Diff:
diff --git a/Zend/tests/type_declarations/typed_properties_027.phpt
b/Zend/tests/type_declarations/typed_properties_027.phpt
index 7509f89..f8cea4c 100644
--- a/Zend/tests/type_declarations/typed_properties_027.phpt
+++ b/Zend/tests/type_declarations/typed_properties_027.phpt
@@ -1,14 +1,19 @@
--TEST--
-Test typed properties int must be allowed to widen to float only at runtime
+Test typed properties float widen at runtime
--FILE--
<?php
class Foo {
- public int $bar = 1.1;
+ public float $bar = 1.1;
}
+
+$foo = new Foo;
+$foo->bar = 10;
+
+var_dump($foo->bar);
?>
--EXPECTF--
-Fatal error: Default value for properties with integer type can only be integer in %s on line 4
+float(10)