1 | <?php |
||
8 | class SessionTest extends TestCase |
||
9 | { |
||
10 | /** |
||
11 | * @covers \Session::__construct |
||
12 | * |
||
13 | * @runInSeparateProcess |
||
14 | */ |
||
15 | public function testConstructCorrectInterface(): void |
||
21 | |||
22 | /** |
||
23 | * @covers \Session::__construct |
||
24 | * |
||
25 | * @runInSeparateProcess |
||
26 | */ |
||
27 | public function testConstructWithoutStartingSession(): void |
||
35 | |||
36 | /** |
||
37 | * @covers \Session::__construct |
||
38 | * |
||
39 | * @runInSeparateProcess |
||
40 | */ |
||
41 | public function testConstructTryingToStartWhileSessionAlreadyExists(): void |
||
49 | |||
50 | /** |
||
51 | * @covers \Session::__construct |
||
52 | * |
||
53 | * @runInSeparateProcess |
||
54 | */ |
||
55 | public function testConstructWithExistingSessionKey(): void |
||
65 | |||
66 | /** |
||
67 | * @covers \Session::__construct |
||
68 | * @covers \Session::storeAccessToken |
||
69 | * |
||
70 | * @runInSeparateProcess |
||
71 | */ |
||
72 | public function testStoreAccessTokenIsAlreadyArray(): void |
||
81 | |||
82 | /** |
||
83 | * @covers \Session::__construct |
||
84 | * @covers \Session::storeAccessToken |
||
85 | * |
||
86 | * @runInSeparateProcess |
||
87 | */ |
||
88 | public function testStoreAccessTokenIsNotArray(): void |
||
99 | |||
100 | /** |
||
101 | * @covers \Session::__construct |
||
102 | * @covers \Session::hasAccessToken |
||
103 | * @covers \Session::retrieveAccessToken |
||
104 | * @covers \Session::storeAccessToken |
||
105 | * |
||
106 | * @runInSeparateProcess |
||
107 | */ |
||
108 | public function testRetrieveAccessTokenValid(): void |
||
116 | |||
117 | /** |
||
118 | * @covers \Session::__construct |
||
119 | * @covers \Session::hasAccessToken |
||
120 | * @covers \Session::retrieveAccessToken |
||
121 | * |
||
122 | * @runInSeparateProcess |
||
123 | */ |
||
124 | public function testRetrieveAccessTokenThrowsExceptionWhenTokenIsNotFound(): void |
||
132 | |||
133 | /** |
||
134 | * @covers \Session::__construct |
||
135 | * @covers \Session::hasAccessToken |
||
136 | * @covers \Session::storeAccessToken |
||
137 | * |
||
138 | * @runInSeparateProcess |
||
139 | */ |
||
140 | public function testHasAccessTokenTrue(): void |
||
148 | |||
149 | /** |
||
150 | * @covers \Session::__construct |
||
151 | * @covers \Session::hasAccessToken |
||
152 | * |
||
153 | * @runInSeparateProcess |
||
154 | */ |
||
155 | public function testHasAccessTokenFalse(): void |
||
161 | |||
162 | /** |
||
163 | * @covers \Session::__construct |
||
164 | * @covers \Session::clearToken |
||
165 | * |
||
166 | * @runInSeparateProcess |
||
167 | */ |
||
168 | public function testClearTokenIsNotSet(): void |
||
174 | |||
175 | /** |
||
176 | * @covers \Session::__construct |
||
177 | * @covers \Session::clearToken |
||
178 | * @covers \Session::storeAccessToken |
||
179 | * |
||
180 | * @runInSeparateProcess |
||
181 | */ |
||
182 | public function testClearTokenSet(): void |
||
192 | |||
193 | /** |
||
194 | * @covers \Session::__construct |
||
195 | * @covers \Session::clearAllTokens |
||
196 | * @covers \Session::storeAccessToken |
||
197 | * |
||
198 | * @runInSeparateProcess |
||
199 | */ |
||
200 | public function testClearAllTokens(): void |
||
213 | |||
214 | /** |
||
215 | * @covers \Session::__construct |
||
216 | * @covers \Session::__destruct |
||
217 | * |
||
218 | * @runInSeparateProcess |
||
219 | */ |
||
220 | public function testDestruct(): void |
||
226 | |||
227 | /** |
||
228 | * @covers \Session::retrieveAccessToken |
||
229 | * @covers \Session::storeAccessToken |
||
230 | * |
||
231 | * @runInSeparateProcess |
||
232 | */ |
||
233 | public function testSerializeUnserialize(): void |
||
246 | } |
||
247 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: