public function testGetTopApps()
 {
     $result = $this->app->getTopApps(null);
     $list = $this->getApps("1900-01-01", date("Y-m-d", strtotime("next day")));
     $this->assertTrue(sameValueOrder($result, $list, function ($obj1, $obj2) {
         return $obj1->id == $obj2->id;
     }));
 }
 public function testGetCategories()
 {
     $result = $this->categorie->getGameCategories();
     $list = $this->categorie->select("id")->from("categories")->where(["status" => "ACTIVE", "id <> ?" => "1", "path like ?" => "/1/%"])->orderBy('id')->result();
     $ret = count($result) === ($n = count($list));
     if ($ret) {
         /*
         			for ($i = 0; $i < $n; $i++) {
         				if ($result[$i]->id !== $list[$i]->id) {
         					$ret = false;
         					break;
         				}
         			}
         */
         $ret = sameValueOrder($result, $list, function ($obj1, $obj2) {
             return $obj1->id == $obj2->id;
         });
     }
     $this->assertTrue($ret);
 }