1 | <?php |
||
7 | class XingTest extends \PHPUnit_Framework_TestCase |
||
8 | { |
||
9 | private $client; |
||
10 | private $storage; |
||
11 | private $xing; |
||
12 | |||
13 | |||
14 | protected function setUp() |
||
28 | |||
29 | /** |
||
30 | * @covers OAuth\OAuth1\Service\Xing::__construct |
||
31 | */ |
||
32 | public function testConstructCorrectInterfaceWithoutCustomUri() |
||
38 | |||
39 | /** |
||
40 | * @covers OAuth\OAuth1\Service\Xing::__construct |
||
41 | */ |
||
42 | public function testConstructCorrectInstanceWithoutCustomUri() |
||
48 | |||
49 | /** |
||
50 | * @covers OAuth\OAuth1\Service\Xing::__construct |
||
51 | */ |
||
52 | public function testConstructCorrectInstanceWithCustomUri() |
||
64 | |||
65 | /** |
||
66 | * @covers OAuth\OAuth1\Service\Xing::__construct |
||
67 | * @covers OAuth\OAuth1\Service\Xing::getRequestTokenEndpoint |
||
68 | */ |
||
69 | public function testGetRequestTokenEndpoint() |
||
76 | |||
77 | /** |
||
78 | * @covers OAuth\OAuth1\Service\Xing::__construct |
||
79 | * @covers OAuth\OAuth1\Service\Xing::getAuthorizationEndpoint |
||
80 | */ |
||
81 | public function testGetAuthorizationEndpoint() |
||
88 | |||
89 | /** |
||
90 | * @covers OAuth\OAuth1\Service\Xing::__construct |
||
91 | * @covers OAuth\OAuth1\Service\Xing::getAccessTokenEndpoint |
||
92 | */ |
||
93 | public function testGetAccessTokenEndpoint() |
||
100 | |||
101 | /** |
||
102 | * @covers OAuth\OAuth1\Service\Xing::__construct |
||
103 | * @covers OAuth\OAuth1\Service\Xing::getRequestTokenEndpoint |
||
104 | * @covers OAuth\OAuth1\Service\Xing::parseRequestTokenResponse |
||
105 | */ |
||
106 | public function testParseRequestTokenResponseThrowsExceptionOnNulledResponse() |
||
117 | |||
118 | /** |
||
119 | * @covers OAuth\OAuth1\Service\Xing::__construct |
||
120 | * @covers OAuth\OAuth1\Service\Xing::getRequestTokenEndpoint |
||
121 | * @covers OAuth\OAuth1\Service\Xing::parseRequestTokenResponse |
||
122 | */ |
||
123 | public function testParseRequestTokenResponseThrowsExceptionOnResponseNotAnArray() |
||
134 | |||
135 | /** |
||
136 | * @covers OAuth\OAuth1\Service\Xing::__construct |
||
137 | * @covers OAuth\OAuth1\Service\Xing::getRequestTokenEndpoint |
||
138 | * @covers OAuth\OAuth1\Service\Xing::parseRequestTokenResponse |
||
139 | */ |
||
140 | public function testParseRequestTokenResponseThrowsExceptionOnResponseCallbackNotSet() |
||
151 | |||
152 | /** |
||
153 | * @covers OAuth\OAuth1\Service\Xing::__construct |
||
154 | * @covers OAuth\OAuth1\Service\Xing::getRequestTokenEndpoint |
||
155 | * @covers OAuth\OAuth1\Service\Xing::parseRequestTokenResponse |
||
156 | */ |
||
157 | public function testParseRequestTokenResponseThrowsExceptionOnResponseCallbackNotTrue() |
||
168 | |||
169 | /** |
||
170 | * @covers OAuth\OAuth1\Service\Xing::__construct |
||
171 | * @covers OAuth\OAuth1\Service\Xing::getRequestTokenEndpoint |
||
172 | * @covers OAuth\OAuth1\Service\Xing::parseRequestTokenResponse |
||
173 | * @covers OAuth\OAuth1\Service\Xing::parseAccessTokenResponse |
||
174 | */ |
||
175 | public function testParseRequestTokenResponseValid() |
||
189 | |||
190 | /** |
||
191 | * @covers OAuth\OAuth1\Service\Xing::__construct |
||
192 | * @covers OAuth\OAuth1\Service\Xing::getRequestTokenEndpoint |
||
193 | * @covers OAuth\OAuth1\Service\Xing::parseAccessTokenResponse |
||
194 | */ |
||
195 | public function testParseAccessTokenResponseThrowsExceptionOnError() |
||
213 | |||
214 | /** |
||
215 | * @covers OAuth\OAuth1\Service\Xing::__construct |
||
216 | * @covers OAuth\OAuth1\Service\Xing::getRequestTokenEndpoint |
||
217 | * @covers OAuth\OAuth1\Service\Xing::parseAccessTokenResponse |
||
218 | */ |
||
219 | public function testParseAccessTokenResponseValid() |
||
239 | } |
||
240 |