1--TEST--
2Observer: Basic magic method observability
3--SKIPIF--
4<?php if (!extension_loaded('zend-test')) die('skip: zend-test extension required'); ?>
5--INI--
6zend_test.observer.enabled=1
7zend_test.observer.observe_all=1
8--FILE--
9<?php
10class MagicTest
11{
12    public function __call($name, $args)
13    {
14        echo '__call()' . PHP_EOL;
15        $this->foo($name);
16    }
17
18    public function foo($name)
19    {
20        echo $name . PHP_EOL;
21    }
22}
23
24$test = new MagicTest();
25$test->foo('test');
26$test->bar();
27
28echo 'DONE' . PHP_EOL;
29?>
30--EXPECTF--
31<!-- init '%s%eobserver_magic_01.php' -->
32<file '%s%eobserver_magic_01.php'>
33  <!-- init MagicTest::foo() -->
34  <MagicTest::foo>
35test
36  </MagicTest::foo>
37  <!-- init MagicTest::__call() -->
38  <MagicTest::__call>
39__call()
40    <MagicTest::foo>
41bar
42    </MagicTest::foo>
43  </MagicTest::__call>
44DONE
45</file '%s%eobserver_magic_01.php'>
46