xref: /PHP-7.0/Zend/tests/ns_054.phpt (revision 610c7fbe)
1--TEST--
2054: namespace and interfaces
3--SKIPIF--
4<?php if (!extension_loaded("spl")) die("skip SPL is no available"); ?>
5--FILE--
6<?php
7namespace test\ns1;
8
9class Foo implements \SplObserver {
10	function update(\SplSubject $x) {
11		echo "ok\n";
12	}
13}
14
15class 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--
30ok
31ok
32