1 | <?php |
||
10 | class LinkedinTest extends \PHPUnit_Framework_TestCase |
||
11 | { |
||
12 | const PROFILE_RESPONSE = |
||
13 | '{ |
||
14 | "emailAddress": "[email protected]", |
||
15 | "firstName": "John", |
||
16 | "headline": "Frontend Web Developer", |
||
17 | "id": "ABCDEFGH", |
||
18 | "industry": "Computer Software", |
||
19 | "lastName": "Doe", |
||
20 | "location": { |
||
21 | "country": {"code": "it"}, |
||
22 | "name": "Rome Area, Italy" |
||
23 | }, |
||
24 | "memberUrlResources": { |
||
25 | "_total": 1, |
||
26 | "values": [{ |
||
27 | "id": 11, |
||
28 | "name": "Company Website", |
||
29 | "url": "http://www.johnnydonny.com" |
||
30 | }, |
||
31 | { |
||
32 | "id": 12, |
||
33 | "name": "Blog", |
||
34 | "url": "http://blog.johnnydonny.com" |
||
35 | }] |
||
36 | }, |
||
37 | "pictureUrl": "http://m.c.lnkd.licdn.com/mpr/mprx/someweirdstring", |
||
38 | "publicProfileUrl": "http://www.linkedin.com/in/johnnydonny", |
||
39 | "summary": "I am who I am" |
||
40 | } |
||
41 | '; |
||
42 | |||
43 | /** |
||
44 | * @var Linkedin |
||
45 | */ |
||
46 | protected $extractor; |
||
47 | |||
48 | /** |
||
49 | * Sets up the fixture, for example, opens a network connection. |
||
50 | * This method is called before a test is executed. |
||
51 | */ |
||
52 | protected function setUp() |
||
67 | |||
68 | /** |
||
69 | * Tears down the fixture, for example, closes a network connection. |
||
70 | * This method is called after a test is executed. |
||
71 | */ |
||
72 | protected function tearDown() |
||
75 | |||
76 | public function testDoesNotSupportUsername() |
||
81 | |||
82 | public function testGetUniqueId() |
||
86 | |||
87 | public function testGetFirstName() |
||
91 | |||
92 | public function testGetLastName() |
||
96 | |||
97 | public function testGetFullName() |
||
101 | |||
102 | public function testGetEmail() |
||
106 | |||
107 | public function testGetDescription() |
||
111 | |||
112 | public function testGetImageUrl() |
||
116 | |||
117 | public function testGetProfileUrl() |
||
121 | |||
122 | public function testGetLocation() |
||
126 | |||
127 | public function testGetWebsites() |
||
135 | |||
136 | public function testIsEmailVerified() |
||
140 | |||
141 | public function testGetExtras() |
||
151 | } |
||
152 |