]> granicus.if.org Git - php/commitdiff
Add new test
authorMarcus Boerger <helly@php.net>
Sun, 19 Sep 2004 11:53:30 +0000 (11:53 +0000)
committerMarcus Boerger <helly@php.net>
Sun, 19 Sep 2004 11:53:30 +0000 (11:53 +0000)
ext/reflection/tests/bug30146.phpt [new file with mode: 0755]

diff --git a/ext/reflection/tests/bug30146.phpt b/ext/reflection/tests/bug30146.phpt
new file mode 100755 (executable)
index 0000000..4f48985
--- /dev/null
@@ -0,0 +1,23 @@
+--TEST--
+Bug #30146 (ReflectionProperty->getValue() requires instance for static property)
+--FILE--
+<?php
+class test {
+  static public $a = 1;
+}
+
+$r = new ReflectionProperty('test', 'a');
+var_dump($r->getValue(null));
+
+$r->setValue(NULL, 2);
+var_dump($r->getValue());
+
+$r->setValue(3);
+var_dump($r->getValue());
+?>
+===DONE===
+--EXPECT--
+int(1)
+int(2)
+int(3)
+===DONE===
\ No newline at end of file