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

Commit 625e276

Browse files
author
JamesMallison
committed
Added test for #111
Test checks that hashtags can be searched for
1 parent 0254e84 commit 625e276

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

test/TwitterAPIExchangeTest.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,4 +254,21 @@ public function testStatusesDestroy()
254254
/** We've done this now, yay **/
255255
self::$tweetId = null;
256256
}
257+
258+
/**
259+
* GET search/tweets
260+
*
261+
* @see https://dev.twitter.com/rest/reference/get/search/tweets
262+
*/
263+
public function testCanSearchWithHashTag()
264+
{
265+
$url = 'https://api.twitter.com/1.1/search/tweets.json';
266+
$method = 'GET';
267+
$params = '?q=#twitter';
268+
269+
$data = $this->exchange->request($url, $method, $params);
270+
$data = (array)@json_decode($data, true);
271+
272+
$this->assertNotCount(1, $data);
273+
}
257274
}

0 commit comments

Comments
 (0)