Annotation of embedaddon/php/ext/pdo/tests/bug47769.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Bug #47769 (Strange extends PDO)
        !             3: --SKIPIF--
        !             4: <?php
        !             5: if (!extension_loaded("pdo_sqlite"))
        !             6:        die("skip: PDO_SQLite not available");
        !             7: ?>
        !             8: --FILE--
        !             9: <?php
        !            10: 
        !            11: class test extends PDO
        !            12: {
        !            13:        protected function isProtected() {
        !            14:                echo "this is a protected method.\n";
        !            15:        }
        !            16:        private function isPrivate() {
        !            17:                echo "this is a private method.\n";
        !            18:        }
        !            19:     
        !            20:     public function quote($str, $paramtype = NULL) {
        !            21:        $this->isProtected();
        !            22:        $this->isPrivate();
        !            23:        print $str ."\n";
        !            24:        }
        !            25: }
        !            26: 
        !            27: $test = new test('sqlite::memory:');
        !            28: $test->quote('foo');
        !            29: $test->isProtected();
        !            30: 
        !            31: ?>
        !            32: --EXPECTF--
        !            33: this is a protected method.
        !            34: this is a private method.
        !            35: foo
        !            36: 
        !            37: Fatal error: Call to protected method test::isProtected() from context '' in %s on line %d

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>