xref: /PHP-7.3/Zend/tests/ns_054.phpt (revision 1624b0a9)
1--TEST--
2054: namespace and interfaces
3--FILE--
4<?php
5namespace test\ns1;
6
7class Foo implements \SplObserver {
8	function update(\SplSubject $x) {
9		echo "ok\n";
10	}
11}
12
13class Bar implements \SplSubject {
14	function attach(\SplObserver $x) {
15		echo "ok\n";
16	}
17	function notify() {
18	}
19	function detach(\SplObserver $x) {
20	}
21}
22$foo = new Foo();
23$bar = new Bar();
24$bar->attach($foo);
25$foo->update($bar);
26?>
27--EXPECT--
28ok
29ok
30