[php] Check fooCount() in newobject1_runme.php
This commit is contained in:
parent
8432d3f89b
commit
ee3c9bd697
1 changed files with 7 additions and 0 deletions
|
|
@ -9,9 +9,16 @@ check::classes(array('Foo'));
|
|||
// No new vars
|
||||
check::globals(array());
|
||||
|
||||
check::equal(Foo::fooCount(), 0, "no Foo objects expected");
|
||||
$foo = Foo::makeFoo();
|
||||
check::equal(get_class($foo), "Foo", "static failed");
|
||||
check::equal(Foo::fooCount(), 1, "1 Foo object expected");
|
||||
$bar = $foo->makeMore();
|
||||
check::equal(get_class($bar), "Foo", "regular failed");
|
||||
check::equal(Foo::fooCount(), 2, "2 Foo objects expected");
|
||||
$foo = null;
|
||||
check::equal(Foo::fooCount(), 1, "1 Foo object expected");
|
||||
$bar = null;
|
||||
check::equal(Foo::fooCount(), 0, "no Foo objects expected");
|
||||
|
||||
check::done();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue