File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -201,7 +201,7 @@ public function it_can_show_cache_events()
201
201
}
202
202
203
203
/** @test */
204
- public function it_preserves_structure ()
204
+ public function it_preserves_object ()
205
205
{
206
206
$ this ->app ['router ' ]->get ('foo ' , function () {
207
207
return response ()->json ([
@@ -214,4 +214,19 @@ public function it_preserves_structure()
214
214
->assertStatus (200 )
215
215
->assertSeeText ('"baz":{} ' );
216
216
}
217
+
218
+ /** @test */
219
+ public function it_preserves_array ()
220
+ {
221
+ $ this ->app ['router ' ]->get ('foo ' , function () {
222
+ return response ()->json ([
223
+ 'foo ' => 'bar ' ,
224
+ 'baz ' => [],
225
+ ]);
226
+ });
227
+
228
+ $ this ->json ('get ' , '/foo ' )
229
+ ->assertStatus (200 )
230
+ ->assertSeeText ('"baz":[] ' );
231
+ }
217
232
}
You can’t perform that action at this time.
0 commit comments