]> granicus.if.org Git - php/commitdiff
- Added test
authorFelipe Pena <felipe@php.net>
Wed, 8 Apr 2009 00:29:55 +0000 (00:29 +0000)
committerFelipe Pena <felipe@php.net>
Wed, 8 Apr 2009 00:29:55 +0000 (00:29 +0000)
Zend/tests/bug47801.phpt [new file with mode: 0644]
ext/date/tests/bug46108.phpt [new file with mode: 0644]

diff --git a/Zend/tests/bug47801.phpt b/Zend/tests/bug47801.phpt
new file mode 100644 (file)
index 0000000..3230819
--- /dev/null
@@ -0,0 +1,31 @@
+--TEST--
+Bug #47801 (__call() accessed via parent:: operator is provided incorrect method name)
+--FILE--
+<?php
+
+class A
+{
+  function __call($name, $args)
+  {
+    echo("magic method called: $name\n");
+  }
+}
+
+class B extends A
+{
+  function getFoo()
+  {
+    parent::getFoo();
+  }
+}
+
+$a = new A();
+$a->getFoo();
+
+$b = new B();
+$b->getFoo();
+
+?>
+--EXPECT--
+magic method called: getFoo
+magic method called: getFoo
diff --git a/ext/date/tests/bug46108.phpt b/ext/date/tests/bug46108.phpt
new file mode 100644 (file)
index 0000000..12fdfa7
--- /dev/null
@@ -0,0 +1,19 @@
+--TEST--
+Bug #46108 (DateTime - Memory leak when unserializing)
+--FILE--
+<?php
+
+date_default_timezone_set('America/Sao_Paulo');
+
+var_dump(unserialize(serialize(new Datetime)));
+
+?>
+--EXPECTF--
+object(DateTime)#%d (3) {
+  [%u|b%"date"]=>
+  %string|unicode%(%d) "%s"
+  [%u|b%"timezone_type"]=>
+  int(%d)
+  [%u|b%"timezone"]=>
+  %string|unicode%(%d) "America/Sao_Paulo"
+}