/trunk/Examples/test-suite/php/director_thread_runme.php
PHP | 29 lines | 19 code | 7 blank | 3 comment | 1 complexity | 63d249dfc74313d0d1eb4f789bdb9102 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
- <?php
- require "tests.php";
- require "director_thread.php";
- // No new functions
- check::functions(array(millisecondsleep,foo_stop,foo_run,foo_do_foo));
- // No new classes
- check::classes(array(director_thread,Foo));
- // now new vars
- check::globals(array(foo_val));
- class Derived extends Foo {
- function do_foo() {
- $this->val = $this->val - 1;
- }
- }
- $d = new Derived();
- $d->run();
- if ($d->val >= 0) {
- check::fail($d->val);
- }
- $d->stop();
- check::done();
- ?>