--- a/server/src/tests/Controllers/DateStatsControllerTest.php Sat Jun 10 22:43:58 2017 +0200
+++ b/server/src/tests/Controllers/DateStatsControllerTest.php Mon Jun 12 14:53:59 2017 +0200
@@ -102,8 +102,10 @@
}
}
}', true));
- $this->get('/api/v1/stats/datestats/')->assertTrue($this->response->isOk(), $this->response->content());
- $this->seeJsonEquals(["datestats" => []]);
+ $response = $this->get('/api/v1/stats/datestats/');
+ $response
+ ->assertStatus(200)
+ ->assertJson(["datestats" => []]);
}
public function testIndexResult() {
@@ -159,8 +161,10 @@
}
}
}', true));
- $this->get('/api/v1/stats/datestats/')->assertTrue($this->response->isOk(), $this->response->content());
- $this->seeJsonEquals(["datestats" => [
+ $response = $this->get('/api/v1/stats/datestats/');
+ $response
+ ->assertStatus(200)
+ ->assertJson(["datestats" => [
"1948" => 3,
"1957" => 29,
"1963" => 22,
@@ -201,8 +205,10 @@
}
}
}', true));
- $this->get('/api/v1/stats/dateminmax/')->assertTrue($this->response->isOk(), $this->response->content());
- $this->seeJsonEquals(["dateminmax" => [0, 0]]);
+ $response = $this->get('/api/v1/stats/dateminmax/');
+ $response
+ ->assertStatus(200)
+ ->assertJson(["dateminmax" => [0, 0]]);
}
public function testMinMaxResult() {
@@ -235,8 +241,10 @@
}
}
}', true));
- $this->get('/api/v1/stats/dateminmax/')->assertTrue($this->response->isOk(), $this->response->content());
- $this->seeJsonEquals(["dateminmax" => [ 1948, 2015 ]]);
+ $response = $this->get('/api/v1/stats/dateminmax/');
+ $response
+ ->assertStatus(200)
+ ->assertJson(["dateminmax" => [ 1948, 2015 ]]);
}
}