summaryrefslogtreecommitdiff
path: root/Examples/test-suite/php/li_factory_runme.php
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/test-suite/php/li_factory_runme.php')
-rw-r--r--Examples/test-suite/php/li_factory_runme.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/Examples/test-suite/php/li_factory_runme.php b/Examples/test-suite/php/li_factory_runme.php
new file mode 100644
index 0000000..6623e2a
--- /dev/null
+++ b/Examples/test-suite/php/li_factory_runme.php
@@ -0,0 +1,22 @@
+<?php
+
+require "tests.php";
+require "li_factory.php";
+
+// No new functions
+check::functions(array(geometry_draw,geometry_create,geometry_clone_,point_draw,point_width,point_clone_,circle_draw,circle_radius,circle_clone_));
+// No new classes
+check::classes(array(Geometry,Point,Circle));
+// now new vars
+check::globals(array());
+
+$circle = Geometry::create(Geometry::CIRCLE);
+$r = $circle->radius();
+check::equal($r, 1.5, "r failed");
+
+$point = Geometry::create(Geometry::POINT);
+$w = $point->width();
+check::equal($w, 1.0, "w failed");
+
+check::done();
+?>