summaryrefslogtreecommitdiff
path: root/tests/php/dbg.php
diff options
context:
space:
mode:
authorvalmat <ufabiz@gmail.com>2014-03-28 00:42:09 +0600
committervalmat <ufabiz@gmail.com>2014-03-28 00:42:09 +0600
commit28152192b85cbe9bf5ea08ebe8c706d12e2e13e5 (patch)
treed8a5cbee7e39f6b21c0e698d1ac10ac764b00193 /tests/php/dbg.php
parentf56cff9e4f67a949e6f0ae35ca63aaaea16d9a41 (diff)
add test: class_obj/003-comparable.phpt
Diffstat (limited to 'tests/php/dbg.php')
-rw-r--r--tests/php/dbg.php34
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/php/dbg.php b/tests/php/dbg.php
index 2040f01..b9841c7 100644
--- a/tests/php/dbg.php
+++ b/tests/php/dbg.php
@@ -12,3 +12,37 @@
+//-
+
+// initialize a couple of objects
+$object1 = new TestBaseClass\Comparable();
+$object2 = new TestBaseClass\Comparable();
+$object3 = new TestBaseClass\Comparable();
+
+// compare the objects
+if ($object1 < $object2)
+{
+ echo("$object1 is smaller than $object2\n");
+}
+else
+{
+ echo("$object1 is bigger than $object2\n");
+}
+
+if ($object1 == $object3)
+{
+ echo("$object1 is equal to $object3\n");
+}
+else
+{
+ echo("$object1 is not equal to $object3\n");
+}
+
+if ($object1 != $object2)
+{
+ echo("$object1 is not equal to $object2\n");
+}
+else
+{
+ echo("$object1 is equal to $object2\n");
+} \ No newline at end of file