swig/Examples/test-suite/php/newobject3_runme.php
Olly Betts 883b42dc70 [php] Ensure _runme.php calls check::done()
This function doesn't do anything currently so these missing calls are a
latent issue.  It could be used for e.g. memory leak checking in the
future though, and it's potentially a useful place to add code when
debugging.
2021-12-05 12:40:44 +13:00

17 lines
579 B
PHP

<?php
require "tests.php";
$factory = new factory();
check::classname("Product", $factory->create(7));
check::classname("Product", $factory->create(7, 6));
check::classname("Product", $factory->create("test"));
check::classname("Product", $factory->create("test", 2));
check::isnull($factory->create(0), "create(0) should be NULL");
check::isnull($factory->create(7, -1), "create(7, -1) should be NULL");
check::isnull($factory->create(0, -1), "create(0, -1) should be NULL");
check::isnull($factory->create("bad", -1), "create(\"bad\", -1) should be NULL");
check::done();