| @@ 19-33 (lines=15) @@ | ||
| 16 | // Tester |
|
| 17 | /////////// |
|
| 18 | ||
| 19 | public function testTotalPokemon() |
|
| 20 | { |
|
| 21 | $req = 'SELECT COUNT(*) as total FROM sightings'; |
|
| 22 | $result = $this->mysqli->query($req); |
|
| 23 | if (!is_object($result)) { |
|
| 24 | return 1; |
|
| 25 | } else { |
|
| 26 | $data = $result->fetch_object(); |
|
| 27 | $total = $data->total; |
|
| 28 | ||
| 29 | if (0 == $total) { |
|
| 30 | return 2; |
|
| 31 | } |
|
| 32 | } |
|
| 33 | ||
| 34 | return 0; |
|
| 35 | } |
|
| 36 | ||
| @@ 37-51 (lines=15) @@ | ||
| 34 | return 0; |
|
| 35 | } |
|
| 36 | ||
| 37 | public function testTotalGyms() |
|
| 38 | { |
|
| 39 | $req = 'SELECT COUNT(*) as total FROM forts'; |
|
| 40 | $result = $this->mysqli->query($req); |
|
| 41 | if (!is_object($result)) { |
|
| 42 | return 1; |
|
| 43 | } else { |
|
| 44 | $data = $result->fetch_object(); |
|
| 45 | $total = $data->total; |
|
| 46 | ||
| 47 | if (0 == $total) { |
|
| 48 | return 2; |
|
| 49 | } |
|
| 50 | } |
|
| 51 | ||
| 52 | return 0; |
|
| 53 | } |
|
| 54 | ||
| @@ 55-69 (lines=15) @@ | ||
| 52 | return 0; |
|
| 53 | } |
|
| 54 | ||
| 55 | public function testTotalPokestops() |
|
| 56 | { |
|
| 57 | $req = 'SELECT COUNT(*) as total FROM pokestops'; |
|
| 58 | $result = $this->mysqli->query($req); |
|
| 59 | if (!is_object($result)) { |
|
| 60 | return 1; |
|
| 61 | } else { |
|
| 62 | $data = $result->fetch_object(); |
|
| 63 | $total = $data->total; |
|
| 64 | ||
| 65 | if (0 == $total) { |
|
| 66 | return 2; |
|
| 67 | } |
|
| 68 | } |
|
| 69 | ||
| 70 | return 0; |
|
| 71 | } |
|
| 72 | ||
| @@ 19-33 (lines=15) @@ | ||
| 16 | // Tester |
|
| 17 | /////////// |
|
| 18 | ||
| 19 | public function testTotalPokemon() |
|
| 20 | { |
|
| 21 | $req = 'SELECT COUNT(*) as total FROM pokemon'; |
|
| 22 | $result = $this->mysqli->query($req); |
|
| 23 | if (!is_object($result)) { |
|
| 24 | return 1; |
|
| 25 | } else { |
|
| 26 | $data = $result->fetch_object(); |
|
| 27 | $total = $data->total; |
|
| 28 | ||
| 29 | if (0 == $total) { |
|
| 30 | return 2; |
|
| 31 | } |
|
| 32 | } |
|
| 33 | ||
| 34 | return 0; |
|
| 35 | } |
|
| 36 | ||
| @@ 37-51 (lines=15) @@ | ||
| 34 | return 0; |
|
| 35 | } |
|
| 36 | ||
| 37 | public function testTotalGyms() |
|
| 38 | { |
|
| 39 | $req = 'SELECT COUNT(*) as total FROM gym'; |
|
| 40 | $result = $this->mysqli->query($req); |
|
| 41 | if (!is_object($result)) { |
|
| 42 | return 1; |
|
| 43 | } else { |
|
| 44 | $data = $result->fetch_object(); |
|
| 45 | $total = $data->total; |
|
| 46 | ||
| 47 | if (0 == $total) { |
|
| 48 | return 2; |
|
| 49 | } |
|
| 50 | } |
|
| 51 | ||
| 52 | return 0; |
|
| 53 | } |
|
| 54 | ||
| @@ 55-69 (lines=15) @@ | ||
| 52 | return 0; |
|
| 53 | } |
|
| 54 | ||
| 55 | public function testTotalPokestops() |
|
| 56 | { |
|
| 57 | $req = 'SELECT COUNT(*) as total FROM pokestop'; |
|
| 58 | $result = $this->mysqli->query($req); |
|
| 59 | if (!is_object($result)) { |
|
| 60 | return 1; |
|
| 61 | } else { |
|
| 62 | $data = $result->fetch_object(); |
|
| 63 | $total = $data->total; |
|
| 64 | ||
| 65 | if (0 == $total) { |
|
| 66 | return 2; |
|
| 67 | } |
|
| 68 | } |
|
| 69 | ||
| 70 | return 0; |
|
| 71 | } |
|
| 72 | ||