Skip to content
This repository was archived by the owner on Jan 15, 2025. It is now read-only.

Commit 90ccc1d

Browse files
author
JamesMallison
committed
5.3 compatibility
1 parent 714e5e1 commit 90ccc1d

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

test/TwitterAPIExchangeTest.php

+8-8
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,9 @@ public function testMediaUpload()
176176

177177
$url = 'https://upload.twitter.com/1.1/media/upload.json';
178178
$method = 'POST';
179-
$params = [
179+
$params = array(
180180
'media_data' => $data
181-
];
181+
);
182182

183183
$data = $this->exchange->request($url, $method, $params);
184184
$expected = 'image\/png';
@@ -188,7 +188,7 @@ public function testMediaUpload()
188188
/** Store the media id for later **/
189189
$data = @json_decode($data, true);
190190

191-
$this->assertArrayHasKey('media_id', is_array($data) ? $data : []);
191+
$this->assertArrayHasKey('media_id', is_array($data) ? $data : array());
192192

193193
self::$mediaId = $data['media_id'];
194194
}
@@ -207,10 +207,10 @@ public function testStatusesUpdate()
207207

208208
$url = 'https://api.twitter.com/1.1/statuses/update.json';
209209
$method = 'POST';
210-
$params = [
210+
$params = array(
211211
'status' => 'TEST TWEET TO BE DELETED' . rand(),
212212
'media_ids' => self::$mediaId
213-
];
213+
);
214214

215215
$data = $this->exchange->request($url, $method, $params);
216216
$expected = 'TEST TWEET TO BE DELETED';
@@ -220,7 +220,7 @@ public function testStatusesUpdate()
220220
/** Store the tweet id for testStatusesDestroy() **/
221221
$data = @json_decode($data, true);
222222

223-
$this->assertArrayHasKey('id_str', is_array($data) ? $data : []);
223+
$this->assertArrayHasKey('id_str', is_array($data) ? $data : array());
224224

225225
self::$tweetId = $data['id_str'];
226226

@@ -242,9 +242,9 @@ public function testStatusesDestroy()
242242

243243
$url = sprintf('https://api.twitter.com/1.1/statuses/destroy/%d.json', self::$tweetId);
244244
$method = 'POST';
245-
$params = [
245+
$params = array(
246246
'id' => self::$tweetId
247-
];
247+
);
248248

249249
$data = $this->exchange->request($url, $method, $params);
250250
$expected = 'TEST TWEET TO BE DELETED';

0 commit comments

Comments
 (0)