summaryrefslogtreecommitdiff
path: root/pear/tests
diff options
context:
space:
mode:
authorStig Bakken <ssb@php.net>2001-04-13 22:24:33 +0000
committerStig Bakken <ssb@php.net>2001-04-13 22:24:33 +0000
commit81e1ef0ad7ac4b09904ec0bc2aae0994cd08cf12 (patch)
tree145256049ab8243d27872ff670abaa7badb67db9 /pear/tests
parentfd7ec5e216510bbc600242d18adecbb13a557374 (diff)
downloadphp-git-81e1ef0ad7ac4b09904ec0bc2aae0994cd08cf12.tar.gz
* PEAR: look for destructor methods in parent classes if
the current class does not have one
Diffstat (limited to 'pear/tests')
-rw-r--r--pear/tests/pear1.phpt31
1 files changed, 25 insertions, 6 deletions
diff --git a/pear/tests/pear1.phpt b/pear/tests/pear1.phpt
index 2dc49a656d..07b737f5bc 100644
--- a/pear/tests/pear1.phpt
+++ b/pear/tests/pear1.phpt
@@ -18,22 +18,41 @@ class TestPEAR extends PEAR {
}
}
-print "test class TestPEAR\n";
+class Test2 extends PEAR {
+ function _Test2() {
+ print "This is the Test2 destructor\n";
+ $this->_PEAR();
+ }
+}
+
+class Test3 extends Test2 {
+}
+
+print "testing plain destructors\n";
$o = new TestPEAR("test1");
$p = new TestPEAR("test2");
-var_dump(get_class($o));
-var_dump(get_class($p));
+print "..\n";
+print "testing inherited destructors\n";
+$q = new Test3;
+
+print "..\n";
+print "script exiting...\n";
+print "..\n";
?>
--GET--
--POST--
--EXPECT--
-test class TestPEAR
+testing plain destructors
PEAR constructor called, class=testpear
PEAR constructor called, class=testpear
-string(8) "testpear"
-string(8) "testpear"
+..
+testing inherited destructors
+..
+script exiting...
+..
This is the TestPEAR(test1) destructor
PEAR destructor called, class=testpear
This is the TestPEAR(test2) destructor
PEAR destructor called, class=testpear
+This is the Test2 destructor