--- a/server/src/tests/Controllers/DiscourseControllerTest.php Sat Jun 10 22:43:58 2017 +0200
+++ b/server/src/tests/Controllers/DiscourseControllerTest.php Mon Jun 12 14:53:59 2017 +0200
@@ -67,9 +67,11 @@
}
}', true));
- $this->get('/api/v1/stats/discourses/')->assertTrue($this->response->isOk(), $this->response->content());
+ $response = $this->get('/api/v1/stats/discourses/');
- $this->seeJsonEquals(["discourses" => [
+ $response
+ ->assertStatus(200)
+ ->assertJson(["discourses" => [
"http://ark.bnf.fr/ark:/12148/cb12083158d" => ["label" => "argumentation", "count" => 44],
"http://ark.bnf.fr/ark:/12148/cb119783362" => ["label" => "bavardage", "count" => 33],
"http://ark.bnf.fr/ark:/12148/cb13319048g" => ["label" => "chansons", "count" => 22],
@@ -102,8 +104,10 @@
}
}
}', true));
- $this->get('/api/v1/stats/discourses/')->assertTrue($this->response->isOk(), $this->response->content());
- $this->seeJsonEquals(["discourses" => [
+ $response = $this->get('/api/v1/stats/discourses/');
+ $response
+ ->assertStatus(200)
+ ->assertJson(["discourses" => [
]]);
}
}