1 | <?php |
||
9 | class TwitterTest extends \PHPUnit_Framework_TestCase |
||
10 | { |
||
11 | const PROFILE_RESPONSE = |
||
12 | '{ |
||
13 | "name": "Matt Harris", |
||
14 | "profile_sidebar_border_color": "C0DEED", |
||
15 | "profile_background_tile": false, |
||
16 | "profile_sidebar_fill_color": "DDEEF6", |
||
17 | "location": "San Francisco", |
||
18 | "profile_image_url": "http://a1.twimg.com/profile_images/554181350/matt_normal.jpg", |
||
19 | "created_at": "Sat Feb 17 20:49:54 +0000 2007", |
||
20 | "profile_link_color": "0084B4", |
||
21 | "favourites_count": 95, |
||
22 | "url": "http://themattharris.com", |
||
23 | "entities": { |
||
24 | "url": { |
||
25 | "urls": [{ |
||
26 | "url": "http:\/\/t.co\/78pYTvWfJd", |
||
27 | "expanded_url": "http:\/\/dev.twitter.com", |
||
28 | "display_url": "dev.twitter.com", |
||
29 | "indices": [0, 22] |
||
30 | }] |
||
31 | }, |
||
32 | "description": { |
||
33 | "urls": [] |
||
34 | } |
||
35 | }, |
||
36 | "contributors_enabled": false, |
||
37 | "utc_offset": -28800, |
||
38 | "id": 777925, |
||
39 | "profile_use_background_image": true, |
||
40 | "profile_text_color": "333333", |
||
41 | "protected": false, |
||
42 | "followers_count": 1025, |
||
43 | "lang": "en", |
||
44 | "verified": false, |
||
45 | "profile_background_color": "C0DEED", |
||
46 | "geo_enabled": true, |
||
47 | "notifications": false, |
||
48 | "description": "Developer Advocate at Twitter.", |
||
49 | "time_zone": "Tijuana", |
||
50 | "friends_count": 294, |
||
51 | "statuses_count": 2924, |
||
52 | "profile_background_image_url": "http://s.twimg.com/a/1276711174/images/themes/theme1/bg.png", |
||
53 | "status": { |
||
54 | "coordinates": { |
||
55 | "coordinates": [ |
||
56 | -122.40075845, |
||
57 | 37.78264991 |
||
58 | ], |
||
59 | "type": "Point" |
||
60 | }, |
||
61 | "favorited": false, |
||
62 | "created_at": "Tue Jun 22 18:17:48 +0000 2010", |
||
63 | "truncated": false, |
||
64 | "text": "Going through and updating @twitterapi documentation", |
||
65 | "contributors": null, |
||
66 | "id": 16789004997, |
||
67 | "geo": { |
||
68 | "coordinates": [ |
||
69 | 37.78264991, |
||
70 | -122.40075845 |
||
71 | ], |
||
72 | "type": "Point" |
||
73 | }, |
||
74 | "in_reply_to_user_id": null, |
||
75 | "place": null, |
||
76 | "source": "<a href=\"http://itunes.apple.com/app/twitter/id333903271?mt=8\" rel=\"nofollow\">Twitter for iPhone</a>", |
||
77 | "in_reply_to_screen_name": null, |
||
78 | "in_reply_to_status_id": null |
||
79 | }, |
||
80 | "screen_name": "themattharris", |
||
81 | "following": false |
||
82 | }'; |
||
83 | |||
84 | /** |
||
85 | * @var Twitter |
||
86 | */ |
||
87 | protected $extractor; |
||
88 | |||
89 | /** |
||
90 | * Sets up the fixture, for example, opens a network connection. |
||
91 | * This method is called before a test is executed. |
||
92 | */ |
||
93 | protected function setUp() |
||
108 | |||
109 | /** |
||
110 | * Tears down the fixture, for example, closes a network connection. |
||
111 | * This method is called after a test is executed. |
||
112 | */ |
||
113 | protected function tearDown() |
||
116 | |||
117 | public function testDoesNotSupportEmail() |
||
122 | |||
123 | public function testDoesNotSupportVerifiedEmail() |
||
128 | |||
129 | public function testGetUniqueId() |
||
133 | |||
134 | public function testGetUsername() |
||
138 | |||
139 | public function testGetFullName() |
||
143 | |||
144 | public function testGetFistName() |
||
148 | |||
149 | public function testGetLastName() |
||
153 | |||
154 | public function testGetDescription() |
||
158 | |||
159 | public function testGetLocation() |
||
163 | |||
164 | public function testGetProfileUrl() |
||
168 | |||
169 | public function testGetImageUrl() |
||
176 | |||
177 | public function testGetWebsites() |
||
185 | |||
186 | public function testGetExtra() |
||
198 | } |
||
199 |