@@ 244-250 (lines=7) @@ | ||
241 | ->shouldAllowMockingProtectedMethods() |
|
242 | ->shouldReceive('proxyFailureResponse') |
|
243 | ->andReturnUsing( |
|
244 | function ($code, $desc, $format) { |
|
245 | $this->assertEquals(CasException::INVALID_REQUEST, $code); |
|
246 | $this->assertEquals('param pgt and targetService can not be empty', $desc); |
|
247 | $this->assertEquals('XML', $format); |
|
248 | ||
249 | return 'proxyFailureResponse called'; |
|
250 | } |
|
251 | ) |
|
252 | ->once() |
|
253 | ->getMock(); |
|
@@ 279-285 (lines=7) @@ | ||
276 | ->shouldAllowMockingProtectedMethods() |
|
277 | ->shouldReceive('authFailureResponse') |
|
278 | ->andReturnUsing( |
|
279 | function ($code, $desc, $format) { |
|
280 | $this->assertEquals(CasException::INVALID_REQUEST, $code); |
|
281 | $this->assertEquals('param service and ticket can not be empty', $desc); |
|
282 | $this->assertEquals('JSON', $format); |
|
283 | ||
284 | return 'authFailureResponse called'; |
|
285 | } |
|
286 | ) |
|
287 | ->once() |
|
288 | ->getMock(); |
|
@@ 304-310 (lines=7) @@ | ||
301 | ->once() |
|
302 | ->shouldReceive('authFailureResponse') |
|
303 | ->andReturnUsing( |
|
304 | function ($code, $desc, $format) { |
|
305 | $this->assertEquals(CasException::INTERNAL_ERROR, $code); |
|
306 | $this->assertEquals('try to lock ticket failed', $desc); |
|
307 | $this->assertEquals('JSON', $format); |
|
308 | ||
309 | return 'authFailureResponse called'; |
|
310 | } |
|
311 | ) |
|
312 | ->once() |
|
313 | ->getMock(); |
|
@@ 337-343 (lines=7) @@ | ||
334 | ->once() |
|
335 | ->shouldReceive('authFailureResponse') |
|
336 | ->andReturnUsing( |
|
337 | function ($code, $desc, $format) { |
|
338 | $this->assertEquals(CasException::INVALID_TICKET, $code); |
|
339 | $this->assertEquals('ticket is not valid', $desc); |
|
340 | $this->assertEquals('JSON', $format); |
|
341 | ||
342 | return 'authFailureResponse called'; |
|
343 | } |
|
344 | ) |
|
345 | ->once() |
|
346 | ->getMock(); |
|
@@ 381-387 (lines=7) @@ | ||
378 | ->once() |
|
379 | ->shouldReceive('authFailureResponse') |
|
380 | ->andReturnUsing( |
|
381 | function ($code, $desc, $format) { |
|
382 | $this->assertEquals(CasException::INVALID_SERVICE, $code); |
|
383 | $this->assertEquals('service is not valid', $desc); |
|
384 | $this->assertEquals('JSON', $format); |
|
385 | ||
386 | return 'authFailureResponse called'; |
|
387 | } |
|
388 | ) |
|
389 | ->once() |
|
390 | ->getMock(); |
|
@@ 421-427 (lines=7) @@ | ||
418 | ->once() |
|
419 | ->shouldReceive('authFailureResponse') |
|
420 | ->andReturnUsing( |
|
421 | function ($code, $desc, $format) { |
|
422 | $this->assertEquals(CasException::INVALID_TICKET, $code); |
|
423 | $this->assertEquals('ticket is not valid', $desc); |
|
424 | $this->assertEquals('JSON', $format); |
|
425 | ||
426 | return 'authFailureResponse called'; |
|
427 | } |
|
428 | ) |
|
429 | ->once() |
|
430 | ->getMock(); |