Commit 531957ad authored by Alexander Butenko's avatar Alexander Butenko

Merge pull request #337 from avbdr/master

Fix a typo. added jsonbuilder test
parents fe8fb79d 5f947970
...@@ -186,7 +186,7 @@ class dbObject { ...@@ -186,7 +186,7 @@ class dbObject {
*/ */
private function JsonBuilder () { private function JsonBuilder () {
$this->returnType = 'Json'; $this->returnType = 'Json';
return $return; return $this;
} }
/** /**
......
...@@ -274,5 +274,12 @@ if (!is_array ($p->join('user')->orderBy('`products`.id', 'desc')->get(2))) ...@@ -274,5 +274,12 @@ if (!is_array ($p->join('user')->orderBy('`products`.id', 'desc')->get(2)))
if (!is_array ($p->orderBy('`products`.id', 'desc')->join('user')->get(2))) if (!is_array ($p->orderBy('`products`.id', 'desc')->join('user')->get(2)))
echo "wrong return type2"; echo "wrong return type2";
$json = user::jsonBuilder()->get(null, "id, login");
if ($json != '[{"id":1,"login":"user1"},{"id":2,"login":"user2"},{"id":3,"login":"user3"},{"id":4,"login":"testuser"}]') {
echo "jsonbuilder fail";
exit;
}
echo "All done"; echo "All done";
?> ?>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment