aboutsummaryrefslogtreecommitdiff
path: root/Examples/test-suite/php/newobject3_runme.php
blob: edd5d86085ef6712375019ad31e93d0612a78c3e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php

require "tests.php";
require "newobject3.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");

?>