@@ -56,7 +56,10 @@ public function testView(): void
5656 public function testJson (): void
5757 {
5858 $ this ->get ('/incidents/json/1 ' );
59+ $ this ->assertSame (200 , $ this ->_response ->getStatusCode (), 'The reponse code should be 200 ! ' );
5960 $ incident = json_decode ($ this ->_response ->getBody (), true );
61+ $ this ->assertNotNull ($ incident , 'The incident should be an array ! ' );
62+
6063 $ expected = [
6164 'id ' => 1 ,
6265 'error_name ' => 'Lorem ipsum dolor sit amet ' ,
@@ -102,8 +105,10 @@ public function testCreate(): void
102105
103106 $ report = $ this ->Reports ->find (
104107 'all ' ,
105- ['order ' => 'Reports.created desc ' ]
106- )->all ()->first ();
108+ order: ['Reports.created desc ' ]
109+ )->first ();
110+ $ this ->assertNotNull ($ report , 'The report should be created ! ' );
111+
107112 $ subject = 'A new report has been submitted '
108113 . 'on the Error Reporting Server: '
109114 . $ report ['id ' ];
@@ -123,7 +128,7 @@ public function testCreate(): void
123128
124129 $ report = $ this ->Reports ->find (
125130 'all ' ,
126- [ ' order ' => 'Reports.created desc ' ]
131+ order: [ 'Reports.created desc ' ]
127132 )->all ()->first ();
128133 $ this ->Reports ->id = $ report ['id ' ];
129134 $ incidents = $ this ->Reports ->getIncidents ();
@@ -158,7 +163,7 @@ public function testCreate(): void
158163
159164 $ report = $ this ->Reports ->find (
160165 'all ' ,
161- [ ' order ' => 'Reports.created desc ' ]
166+ order: [ 'Reports.created desc ' ]
162167 )->all ()->first ();
163168 $ subject = 'A new report has been submitted '
164169 . 'on the Error Reporting Server: '
0 commit comments