]> granicus.if.org Git - php/commitdiff
- Add test
authorFelipe Pena <felipe@php.net>
Fri, 27 Mar 2009 16:53:03 +0000 (16:53 +0000)
committerFelipe Pena <felipe@php.net>
Fri, 27 Mar 2009 16:53:03 +0000 (16:53 +0000)
ext/pdo/tests/bug47769.phpt [new file with mode: 0644]

diff --git a/ext/pdo/tests/bug47769.phpt b/ext/pdo/tests/bug47769.phpt
new file mode 100644 (file)
index 0000000..a6fafcd
--- /dev/null
@@ -0,0 +1,32 @@
+--TEST--
+Bug #47769 (Strange extends PDO)
+--FILE--
+<?php
+
+class test extends PDO
+{
+       protected function isProtected() {
+               echo "this is a protected method.\n";
+       }
+       private function isPrivate() {
+               echo "this is a private method.\n";
+       }
+    
+    public function quote($str, $paramtype = NULL) {
+       $this->isProtected();
+       $this->isPrivate();
+       print $str ."\n";
+       }
+}
+
+$test = new test('sqlite::memory:');
+$test->quote('foo');
+$test->isProtected();
+
+?>
+--EXPECTF--
+this is a protected method.
+this is a private method.
+foo
+
+Fatal error: Call to protected method test::isprotected() from context '' in %s on line %d