summaryrefslogtreecommitdiff
path: root/tests/classes/interface_implemented.phpt
diff options
context:
space:
mode:
authorSVN Migration <svn@php.net>2006-10-15 21:09:28 +0000
committerSVN Migration <svn@php.net>2006-10-15 21:09:28 +0000
commit88ec761548b66f58acc1a86cdd0fc164ca925476 (patch)
treed0af978fa00d83bb1d82c613f66477fbd6bb18aa /tests/classes/interface_implemented.phpt
parent268984b4787e797db6054313fc9ba3b9e845306e (diff)
downloadphp-git-PECL_OPENSSL.tar.gz
This commit was manufactured by cvs2svn to create branch 'PECL_OPENSSL'.PECL_OPENSSL
Diffstat (limited to 'tests/classes/interface_implemented.phpt')
-rw-r--r--tests/classes/interface_implemented.phpt103
1 files changed, 0 insertions, 103 deletions
diff --git a/tests/classes/interface_implemented.phpt b/tests/classes/interface_implemented.phpt
deleted file mode 100644
index e33a4da002..0000000000
--- a/tests/classes/interface_implemented.phpt
+++ /dev/null
@@ -1,103 +0,0 @@
---TEST--
-ZE2 An interface is inherited
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
---FILE--
-<?php
-
-interface if_a {
- function f_a();
-}
-
-interface if_b extends if_a {
- function f_b();
-}
-
-class base {
- function _is_a($sub) {
- echo 'is_a('.get_class($this).', '.$sub.') = '.(($this instanceof $sub) ? 'yes' : 'no')."\n";
- }
- function test() {
- echo $this->_is_a('base');
- echo $this->_is_a('derived_a');
- echo $this->_is_a('derived_b');
- echo $this->_is_a('derived_c');
- echo $this->_is_a('derived_d');
- echo $this->_is_a('if_a');
- echo $this->_is_a('if_b');
- echo "\n";
- }
-}
-
-class derived_a extends base implements if_a {
- function f_a() {}
-}
-
-class derived_b extends base implements if_a, if_b {
- function f_a() {}
- function f_b() {}
-}
-
-class derived_c extends derived_a implements if_b {
- function f_b() {}
-}
-
-class derived_d extends derived_c {
-}
-
-$t = new base();
-$t->test();
-
-$t = new derived_a();
-$t->test();
-
-$t = new derived_b();
-$t->test();
-
-$t = new derived_c();
-$t->test();
-
-$t = new derived_d();
-$t->test();
-
-?>
---EXPECTF--
-is_a(base, base) = yes
-is_a(base, derived_a) = no
-is_a(base, derived_b) = no
-is_a(base, derived_c) = no
-is_a(base, derived_d) = no
-is_a(base, if_a) = no
-is_a(base, if_b) = no
-
-is_a(derived_a, base) = yes
-is_a(derived_a, derived_a) = yes
-is_a(derived_a, derived_b) = no
-is_a(derived_a, derived_c) = no
-is_a(derived_a, derived_d) = no
-is_a(derived_a, if_a) = yes
-is_a(derived_a, if_b) = no
-
-is_a(derived_b, base) = yes
-is_a(derived_b, derived_a) = no
-is_a(derived_b, derived_b) = yes
-is_a(derived_b, derived_c) = no
-is_a(derived_b, derived_d) = no
-is_a(derived_b, if_a) = yes
-is_a(derived_b, if_b) = yes
-
-is_a(derived_c, base) = yes
-is_a(derived_c, derived_a) = yes
-is_a(derived_c, derived_b) = no
-is_a(derived_c, derived_c) = yes
-is_a(derived_c, derived_d) = no
-is_a(derived_c, if_a) = yes
-is_a(derived_c, if_b) = yes
-
-is_a(derived_d, base) = yes
-is_a(derived_d, derived_a) = yes
-is_a(derived_d, derived_b) = no
-is_a(derived_d, derived_c) = yes
-is_a(derived_d, derived_d) = yes
-is_a(derived_d, if_a) = yes
-is_a(derived_d, if_b) = yes