summaryrefslogtreecommitdiff
path: root/tests/php/dbg.php
diff options
context:
space:
mode:
authorEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2014-03-18 23:35:35 +0100
committerEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2014-03-18 23:35:35 +0100
commit778561e1739a4a7ef20e85b713b4790e6be225d3 (patch)
treed1ff42f6b6f8d6aa68f88319506aba91394aded0 /tests/php/dbg.php
parentbfaed88493de0a3ebd7f2619cb11291cd09252b1 (diff)
parentda5521c2c168edc48e7d2b5dd12305c9dec85b7b (diff)
Merge pull request #44 from valmat/unit-test
Unit tests
Diffstat (limited to 'tests/php/dbg.php')
-rw-r--r--tests/php/dbg.php58
1 files changed, 58 insertions, 0 deletions
diff --git a/tests/php/dbg.php b/tests/php/dbg.php
new file mode 100644
index 0000000..6f1dabc
--- /dev/null
+++ b/tests/php/dbg.php
@@ -0,0 +1,58 @@
+<?php
+
+/**
+ * For debugging tests
+ *
+ */
+
+
+function out($obj) {
+
+
+ $cl_name = is_object($obj) ?
+ get_class($obj) :
+ (is_array($obj) ? "Array" : "----");
+
+ echo "++++-" , $cl_name , "-++++\n";
+
+ echo "\x1b[1;31m";
+ echo "\n Native iterate:\n\n";
+ foreach($obj as $k => $v) {
+ echo "$k\t=>\t$v\n";
+ }
+ echo "\x1b[0m";
+
+
+ TestValueIterator\loopValue($obj);
+}
+
+
+
+require './include/valueiterator/1.php';
+
+#$arr = array('qwe' => 'qweqweqweqw',5,'asd' => '«£¥§©®°±¶⅐⅒⅓⅘⅞Ⅻↆ❄❅❆⚑⚐⌛⌚〰»', 'zxccvx' => 'sdfsecvyh6bug6yfty',);
+#$obj = (object)$arr;
+#$smpl = new SimpleClass;
+#$it = new impIterator;
+#$iag1 = new impIterAggr1;
+$iag2 = new impIterAggr2;
+
+
+//out($arr);
+#out($obj);
+#out($smpl);
+TestValueIterator\loopValue($iag2);
+#out($it);
+#out($iag1);
+#out($iag2);
+
+
+
+
+
+
+
+
+
+
+