php-src/ext/zend_test/tests/observer_magic_01.phpt
Nikita Popov 7485978339
Migrate SKIPIF -> EXTENSIONS (#7138)
This is an automated migration of most SKIPIF extension_loaded checks.
2021-06-11 11:57:42 +02:00

46 lines
802 B
PHP

--TEST--
Observer: Basic magic method observability
--EXTENSIONS--
zend_test
--INI--
zend_test.observer.enabled=1
zend_test.observer.observe_all=1
--FILE--
<?php
class MagicTest
{
public function __call($name, $args)
{
echo '__call()' . PHP_EOL;
$this->foo($name);
}
public function foo($name)
{
echo $name . PHP_EOL;
}
}
$test = new MagicTest();
$test->foo('test');
$test->bar();
echo 'DONE' . PHP_EOL;
?>
--EXPECTF--
<!-- init '%s%eobserver_magic_01.php' -->
<file '%s%eobserver_magic_01.php'>
<!-- init MagicTest::foo() -->
<MagicTest::foo>
test
</MagicTest::foo>
<!-- init MagicTest::__call() -->
<MagicTest::__call>
__call()
<MagicTest::foo>
bar
</MagicTest::foo>
</MagicTest::__call>
DONE
</file '%s%eobserver_magic_01.php'>