1 | <?php |
||
10 | class FacebookTest extends \PHPUnit_Framework_TestCase |
||
11 | { |
||
12 | const RESPONSE_PROFILE = |
||
13 | '{ |
||
14 | "id": "012345678", |
||
15 | "name": "John Doe", |
||
16 | "first_name": "John", |
||
17 | "last_name": "Doe", |
||
18 | "link": "https://www.facebook.com/johnnydonny", |
||
19 | "birthday": "05/17/1987", |
||
20 | "hometown": { |
||
21 | "id": "111665038853258", |
||
22 | "name": "Catania, Italy" |
||
23 | }, |
||
24 | "location": { |
||
25 | "id": "115353315143936", |
||
26 | "name": "Rome, Italy" |
||
27 | }, |
||
28 | "bio": "A life on the edge", |
||
29 | "quotes": "fall seven times - stand up eight", |
||
30 | "gender": "male", |
||
31 | "email": "[email protected]", |
||
32 | "website": "http://blog.foo.com Blog\nhttp://foo.com Portfolio", |
||
33 | "timezone": 1, |
||
34 | "locale": "it_IT", |
||
35 | "verified": true, |
||
36 | "updated_time": "2014-02-07T10:57:24+0000", |
||
37 | "username": "johnnydonny" |
||
38 | }'; |
||
39 | |||
40 | const RESPONSE_IMAGE = |
||
41 | '{ |
||
42 | "data": { |
||
43 | "url": "https://fbcdn-profile-a.akamaihd.net/something_n.jpg", |
||
44 | "is_silhouette": false |
||
45 | } |
||
46 | }'; |
||
47 | |||
48 | /** |
||
49 | * @var Facebook |
||
50 | */ |
||
51 | protected $extractor; |
||
52 | |||
53 | /** |
||
54 | * Sets up the fixture, for example, opens a network connection. |
||
55 | * This method is called before a test is executed. |
||
56 | */ |
||
57 | protected function setUp() |
||
79 | |||
80 | /** |
||
81 | * Tears down the fixture, for example, closes a network connection. |
||
82 | * This method is called after a test is executed. |
||
83 | */ |
||
84 | protected function tearDown() |
||
87 | |||
88 | public function testGetUniqueId() |
||
92 | |||
93 | public function testGetUsername() |
||
97 | |||
98 | public function testGetFirstName() |
||
102 | |||
103 | public function testGetLastName() |
||
107 | |||
108 | public function testGetFullName() |
||
112 | |||
113 | public function testGetEmail() |
||
117 | |||
118 | public function testGetDescription() |
||
122 | |||
123 | public function testGetProfileUrl() |
||
127 | |||
128 | public function testGetLocation() |
||
132 | |||
133 | public function testGetWebsites() |
||
141 | |||
142 | public function testGetImageUrl() |
||
146 | |||
147 | public function testIsEmailVerified() |
||
151 | |||
152 | public function testGetExtra() |
||
163 | } |
||
164 |