Skip to content

Commit a6f27ba

Browse files
committed
:octocat: +Psr7\get_json() $assoc test
1 parent 0796a6b commit a6f27ba

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/Psr7/MessageHelpersTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@ public function testGetJSON(){
104104
->withBody(Psr17\create_stream('{"foo":"bar"}'));
105105

106106
$this->assertSame('bar', Psr7\get_json($r)->foo);
107+
108+
$r->getBody()->rewind();
109+
110+
$this->assertSame('bar', Psr7\get_json($r, true)['foo']);
107111
}
108112

109113
public function testGetXML(){

0 commit comments

Comments
 (0)