Annotation of embedaddon/php/Zend/tests/ns_056.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: 056: type-hint compatibility in namespaces
        !             3: --SKIPIF--
        !             4: <?php if (!extension_loaded("spl")) die("skip SPL is no available"); ?>
        !             5: --FILE--
        !             6: <?php
        !             7: namespace test\ns1;
        !             8: use \SplObserver;
        !             9: 
        !            10: class Foo implements SplObserver {
        !            11:        function update(\SplSubject $x) {
        !            12:                echo "ok\n";
        !            13:        }
        !            14: }
        !            15: 
        !            16: class Bar implements \SplSubject {
        !            17:        function attach(SplObserver $x) {
        !            18:                echo "ok\n";
        !            19:        }
        !            20:        function notify() {
        !            21:        }
        !            22:        function detach(SplObserver $x) {
        !            23:        }
        !            24: }
        !            25: $foo = new Foo();
        !            26: $bar = new Bar();
        !            27: $bar->attach($foo);
        !            28: $foo->update($bar);
        !            29: ?>
        !            30: --EXPECT--
        !            31: ok
        !            32: ok

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