[php] Add runme.php for two more testcases

This commit is contained in:
Olly Betts 2022-06-08 13:00:53 +12:00
commit a1b45a8333
2 changed files with 49 additions and 0 deletions

View file

@ -0,0 +1,23 @@
<?php
require "tests.php";
// No new functions
check::functions(array());
// New classes
check::classes(array('Bar', 'Base'));
// No new vars
check::globals(array());
class MyBar extends Bar {
function pang() {
return "MyBar::pang()";
}
}
$a = new MyBar();
check::equal($a->pang(), "MyBar::pang()", "MyBar::pang() not called as expected");
$b = new Bar();
check::equal($b->pang(), "Bar::pang()", "Bar::pang() not called as expected");
check::done();