Annotation of embedaddon/php/Zend/tests/ns_054.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: 054: namespace and interfaces
! 3: --SKIPIF--
! 4: <?php if (!extension_loaded("spl")) die("skip SPL is no available"); ?>
! 5: --FILE--
! 6: <?php
! 7: namespace test\ns1;
! 8:
! 9: class Foo implements \SplObserver {
! 10: function update(\SplSubject $x) {
! 11: echo "ok\n";
! 12: }
! 13: }
! 14:
! 15: class Bar implements \SplSubject {
! 16: function attach(\SplObserver $x) {
! 17: echo "ok\n";
! 18: }
! 19: function notify() {
! 20: }
! 21: function detach(\SplObserver $x) {
! 22: }
! 23: }
! 24: $foo = new Foo();
! 25: $bar = new Bar();
! 26: $bar->attach($foo);
! 27: $foo->update($bar);
! 28: ?>
! 29: --EXPECT--
! 30: ok
! 31: ok
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>