1 | <?php |
||
7 | class SessionTest extends \PHPUnit_Framework_TestCase |
||
8 | { |
||
9 | /** |
||
10 | * @covers OAuth\Common\Storage\Session::__construct |
||
11 | * |
||
12 | * @runInSeparateProcess |
||
13 | */ |
||
14 | public function testConstructCorrectInterface() |
||
20 | |||
21 | /** |
||
22 | * @covers OAuth\Common\Storage\Session::__construct |
||
23 | * |
||
24 | * @runInSeparateProcess |
||
25 | */ |
||
26 | public function testConstructWithoutStartingSession() |
||
34 | |||
35 | /** |
||
36 | * @covers OAuth\Common\Storage\Session::__construct |
||
37 | * |
||
38 | * @runInSeparateProcess |
||
39 | */ |
||
40 | public function testConstructTryingToStartWhileSessionAlreadyExists() |
||
48 | |||
49 | /** |
||
50 | * @covers OAuth\Common\Storage\Session::__construct |
||
51 | * |
||
52 | * @runInSeparateProcess |
||
53 | */ |
||
54 | public function testConstructWithExistingSessionKey() |
||
64 | |||
65 | /** |
||
66 | * @covers OAuth\Common\Storage\Session::__construct |
||
67 | * @covers OAuth\Common\Storage\Session::storeAccessToken |
||
68 | * |
||
69 | * @runInSeparateProcess |
||
70 | */ |
||
71 | public function testStoreAccessTokenIsAlreadyArray() |
||
80 | |||
81 | /** |
||
82 | * @covers OAuth\Common\Storage\Session::__construct |
||
83 | * @covers OAuth\Common\Storage\Session::storeAccessToken |
||
84 | * |
||
85 | * @runInSeparateProcess |
||
86 | */ |
||
87 | public function testStoreAccessTokenIsNotArray() |
||
98 | |||
99 | /** |
||
100 | * @covers OAuth\Common\Storage\Session::__construct |
||
101 | * @covers OAuth\Common\Storage\Session::storeAccessToken |
||
102 | * @covers OAuth\Common\Storage\Session::retrieveAccessToken |
||
103 | * @covers OAuth\Common\Storage\Session::hasAccessToken |
||
104 | * |
||
105 | * @runInSeparateProcess |
||
106 | */ |
||
107 | public function testRetrieveAccessTokenValid() |
||
115 | |||
116 | /** |
||
117 | * @covers OAuth\Common\Storage\Session::__construct |
||
118 | * @covers OAuth\Common\Storage\Session::retrieveAccessToken |
||
119 | * @covers OAuth\Common\Storage\Session::hasAccessToken |
||
120 | * |
||
121 | * @runInSeparateProcess |
||
122 | */ |
||
123 | public function testRetrieveAccessTokenThrowsExceptionWhenTokenIsNotFound() |
||
131 | |||
132 | /** |
||
133 | * @covers OAuth\Common\Storage\Session::__construct |
||
134 | * @covers OAuth\Common\Storage\Session::storeAccessToken |
||
135 | * @covers OAuth\Common\Storage\Session::hasAccessToken |
||
136 | * |
||
137 | * @runInSeparateProcess |
||
138 | */ |
||
139 | public function testHasAccessTokenTrue() |
||
147 | |||
148 | /** |
||
149 | * @covers OAuth\Common\Storage\Session::__construct |
||
150 | * @covers OAuth\Common\Storage\Session::hasAccessToken |
||
151 | * |
||
152 | * @runInSeparateProcess |
||
153 | */ |
||
154 | public function testHasAccessTokenFalse() |
||
160 | |||
161 | /** |
||
162 | * @covers OAuth\Common\Storage\Session::__construct |
||
163 | * @covers OAuth\Common\Storage\Session::clearToken |
||
164 | * |
||
165 | * @runInSeparateProcess |
||
166 | */ |
||
167 | public function testClearTokenIsNotSet() |
||
173 | |||
174 | /** |
||
175 | * @covers OAuth\Common\Storage\Session::__construct |
||
176 | * @covers OAuth\Common\Storage\Session::storeAccessToken |
||
177 | * @covers OAuth\Common\Storage\Session::clearToken |
||
178 | * |
||
179 | * @runInSeparateProcess |
||
180 | */ |
||
181 | public function testClearTokenSet() |
||
191 | |||
192 | /** |
||
193 | * @covers OAuth\Common\Storage\Session::__construct |
||
194 | * @covers OAuth\Common\Storage\Session::storeAccessToken |
||
195 | * @covers OAuth\Common\Storage\Session::clearAllTokens |
||
196 | * |
||
197 | * @runInSeparateProcess |
||
198 | */ |
||
199 | public function testClearAllTokens() |
||
212 | |||
213 | /** |
||
214 | * @covers OAuth\Common\Storage\Session::__construct |
||
215 | * @covers OAuth\Common\Storage\Session::__destruct |
||
216 | * |
||
217 | * @runInSeparateProcess |
||
218 | */ |
||
219 | public function testDestruct() |
||
225 | |||
226 | /** |
||
227 | * @covers OAuth\Common\Storage\Session::storeAccessToken |
||
228 | * @covers OAuth\Common\Storage\Session::retrieveAccessToken |
||
229 | * |
||
230 | * @runInSeparateProcess |
||
231 | */ |
||
232 | public function testSerializeUnserialize() |
||
245 | } |
||
246 |