@@ -176,9 +176,9 @@ public function testMediaUpload()
176
176
177
177
$ url = 'https://upload.twitter.com/1.1/media/upload.json ' ;
178
178
$ method = 'POST ' ;
179
- $ params = [
179
+ $ params = array (
180
180
'media_data ' => $ data
181
- ] ;
181
+ ) ;
182
182
183
183
$ data = $ this ->exchange ->request ($ url , $ method , $ params );
184
184
$ expected = 'image\/png ' ;
@@ -188,7 +188,7 @@ public function testMediaUpload()
188
188
/** Store the media id for later **/
189
189
$ data = @json_decode ($ data , true );
190
190
191
- $ this ->assertArrayHasKey ('media_id ' , is_array ($ data ) ? $ data : [] );
191
+ $ this ->assertArrayHasKey ('media_id ' , is_array ($ data ) ? $ data : array () );
192
192
193
193
self ::$ mediaId = $ data ['media_id ' ];
194
194
}
@@ -207,10 +207,10 @@ public function testStatusesUpdate()
207
207
208
208
$ url = 'https://api.twitter.com/1.1/statuses/update.json ' ;
209
209
$ method = 'POST ' ;
210
- $ params = [
210
+ $ params = array (
211
211
'status ' => 'TEST TWEET TO BE DELETED ' . rand (),
212
212
'media_ids ' => self ::$ mediaId
213
- ] ;
213
+ ) ;
214
214
215
215
$ data = $ this ->exchange ->request ($ url , $ method , $ params );
216
216
$ expected = 'TEST TWEET TO BE DELETED ' ;
@@ -220,7 +220,7 @@ public function testStatusesUpdate()
220
220
/** Store the tweet id for testStatusesDestroy() **/
221
221
$ data = @json_decode ($ data , true );
222
222
223
- $ this ->assertArrayHasKey ('id_str ' , is_array ($ data ) ? $ data : [] );
223
+ $ this ->assertArrayHasKey ('id_str ' , is_array ($ data ) ? $ data : array () );
224
224
225
225
self ::$ tweetId = $ data ['id_str ' ];
226
226
@@ -242,9 +242,9 @@ public function testStatusesDestroy()
242
242
243
243
$ url = sprintf ('https://api.twitter.com/1.1/statuses/destroy/%d.json ' , self ::$ tweetId );
244
244
$ method = 'POST ' ;
245
- $ params = [
245
+ $ params = array (
246
246
'id ' => self ::$ tweetId
247
- ] ;
247
+ ) ;
248
248
249
249
$ data = $ this ->exchange ->request ($ url , $ method , $ params );
250
250
$ expected = 'TEST TWEET TO BE DELETED ' ;
0 commit comments