File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -93,7 +93,11 @@ function assertThrowException(\SDK\Client $client): void
93
93
94
94
function assertBinary (\SDK \Client $ client ): void
95
95
{
96
- $ payload = \GuzzleHttp \Stream \Stream::factory ('foobar ' );
96
+ $ handle = fopen ('php://memory ' , 'w+ ' );
97
+ fwrite ($ handle , 'foobar ' );
98
+ fseek ($ handle , 0 );
99
+
100
+ $ payload = new \GuzzleHttp \Psr7 \Stream ($ handle );
97
101
98
102
$ response = $ client ->test ()->binary ($ payload );
99
103
@@ -119,7 +123,7 @@ function assertJson(\SDK\Client $client): void
119
123
120
124
$ response = $ client ->test ()->json ($ payload );
121
125
122
- if ($ payload !== $ response ) {
126
+ if (\json_encode ( $ payload) !== \json_encode ( $ response) ) {
123
127
throw new RuntimeException ("Test assertJson failed " );
124
128
}
125
129
}
@@ -128,7 +132,7 @@ function assertText(\SDK\Client $client): void
128
132
{
129
133
$ payload = 'foobar ' ;
130
134
131
- $ response = $ client ->test ()->json ($ payload );
135
+ $ response = $ client ->test ()->text ($ payload );
132
136
133
137
if ($ payload !== $ response ) {
134
138
throw new RuntimeException ("Test assertText failed " );
You can’t perform that action at this time.
0 commit comments