Commit 5f947970 authored by Alexander Butenko's avatar Alexander Butenko

Fix a typo. added jsonbuilder test

parent 8d53d6aa
......@@ -186,7 +186,7 @@ class dbObject {
*/
private function JsonBuilder () {
$this->returnType = 'Json';
return $return;
return $this;
}
/**
......
......@@ -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)))
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";
?>
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