Revert "remove files after run"
[phpt.git] / tests / CodeRunner / decorates-runner.phpt
blobe9284692fa8459b2c47f5989fdd39ec6e27a8419
1 --TEST--
2 PHPT_CodeRunner decorates the real runner, i.e., the PHPT_CodeRunner_Driver_$name
3 object
4 --ARGS--
5 --FILE--
6 <?php
8 require_once dirname(__FILE__) . '/../_setup.inc';
10 class PHPT_CodeRunner_Driver_Foobar
12     public function __set($key, $value) {
13         echo "__set({$key}, {$value})\n";
14     }
15     
16     public function __get($key) {
17         echo "__get({$key})\n";
18     }
19     
20     public function run($filename) {
21         echo __METHOD__ . ' called with ' . $filename, "\n";
22     }
25 $runner = new PHPT_CodeRunner('Foobar');
26 $runner->foo = 'bar';
27 $foo = $runner->foo;
28 $runner->run('foobar.php');
31 ===DONE===
32 --EXPECT--
33 __set(foo, bar)
34 __get(foo)
35 PHPT_CodeRunner_Driver_Foobar::run called with foobar.php
36 ===DONE===