@@ -200,6 +200,7 @@ public function testRequestLogOff()
200
200
*
201
201
* @param bool $logEnabled whether config is set to use request log
202
202
* @throws Exception
203
+ * @throws \Psr\SimpleCache\InvalidArgumentException
203
204
*/
204
205
public function testRequestLogNotInjected ($ logEnabled )
205
206
{
@@ -227,6 +228,7 @@ public function testRequestLogNotInjected($logEnabled)
227
228
*
228
229
* @param bool $cacheEnabled whether config is set to use request log
229
230
* @throws Exception
231
+ * @throws \Psr\SimpleCache\InvalidArgumentException
230
232
*/
231
233
public function testRequestCacheNotInjected ($ cacheEnabled )
232
234
{
@@ -261,6 +263,7 @@ public function configBoolProvider()
261
263
262
264
/**
263
265
* @throws Exception
266
+ * @throws \Psr\SimpleCache\InvalidArgumentException
264
267
*/
265
268
public function testExecuteRequestNotAllowed ()
266
269
{
@@ -286,6 +289,7 @@ public function testExecuteRequestNotAllowed()
286
289
287
290
/**
288
291
* @throws Exception
292
+ * @throws \Psr\SimpleCache\InvalidArgumentException
289
293
*/
290
294
public function testExecuteRunException ()
291
295
{
@@ -341,6 +345,7 @@ public function testExecuteFallbackFailed()
341
345
342
346
/**
343
347
* @throws Exception
348
+ * @throws \Psr\SimpleCache\InvalidArgumentException
344
349
*/
345
350
public function testRuntimeExceptionPopulated ()
346
351
{
@@ -362,6 +367,7 @@ public function testRuntimeExceptionPopulated()
362
367
363
368
/**
364
369
* @throws Exception
370
+ * @throws \Psr\SimpleCache\InvalidArgumentException
365
371
*/
366
372
public function testBadRequestExceptionTracksNoMetrics ()
367
373
{
@@ -386,6 +392,7 @@ public function testBadRequestExceptionTracksNoMetrics()
386
392
387
393
/**
388
394
* @throws Exception
395
+ * @throws \Psr\SimpleCache\InvalidArgumentException
389
396
*/
390
397
public function testShortCircuitedExceptionMessage ()
391
398
{
@@ -445,11 +452,11 @@ public function testRequestCacheHit()
445
452
$ requestCache = $ this ->createMock ('Odesk\Phystrix\RequestCache ' );
446
453
$ requestCache ->expects ($ this ->once ())
447
454
->method ('has ' )
448
- ->with ('Tests.Odesk.Phystrix.CommandMock ' . '. ' . 'test-cache-key ' )
455
+ ->with ('Tests.Odesk.Phystrix.CommandMock ' . '. ' . 'test-cache-key ' )
449
456
->will ($ this ->returnValue (true ));
450
457
$ requestCache ->expects ($ this ->once ())
451
458
->method ('get ' )
452
- ->with ('Tests.Odesk.Phystrix.CommandMock ' . '. ' . 'test-cache-key ' )
459
+ ->with ('Tests.Odesk.Phystrix.CommandMock ' . '. ' . 'test-cache-key ' )
453
460
->will ($ this ->returnValue ('result from cache ' ));
454
461
$ this ->command ->cacheKey = 'test-cache-key ' ;
455
462
$ this ->command ->setRequestCache ($ requestCache );
@@ -471,13 +478,13 @@ public function testRequestCacheMiss()
471
478
$ requestCache = $ this ->createMock ('Odesk\Phystrix\RequestCache ' );
472
479
$ requestCache ->expects ($ this ->once ())
473
480
->method ('has ' )
474
- ->with ('Tests.Odesk.Phystrix.CommandMock ' . '. ' . 'test-cache-key ' )
481
+ ->with ('Tests.Odesk.Phystrix.CommandMock ' . '. ' . 'test-cache-key ' )
475
482
->will ($ this ->returnValue (false ));
476
483
$ requestCache ->expects ($ this ->never ())
477
484
->method ('get ' );
478
485
$ requestCache ->expects ($ this ->once ())
479
486
->method ('set ' )
480
- ->with ('Tests.Odesk.Phystrix.CommandMock ' . '. ' . 'test-cache-key ' , 'run result ' );
487
+ ->with ('Tests.Odesk.Phystrix.CommandMock ' . '. ' . 'test-cache-key ' , 'run result ' );
481
488
$ this ->command ->cacheKey = 'test-cache-key ' ;
482
489
$ this ->command ->setRequestCache ($ requestCache );
483
490
$ this ->commandMetrics ->expects ($ this ->never ())->method ('markResponseFromCache ' );
@@ -496,7 +503,7 @@ public function testSavesResultToCache()
496
503
$ requestCache = $ this ->createMock ('Odesk\Phystrix\RequestCache ' );
497
504
$ requestCache ->expects ($ this ->once ())
498
505
->method ('set ' )
499
- ->with ('Tests.Odesk.Phystrix.CommandMock ' . '. ' . 'test-cache-key ' , 'run result ' );
506
+ ->with ('Tests.Odesk.Phystrix.CommandMock ' . '. ' . 'test-cache-key ' , 'run result ' );
500
507
$ this ->command ->cacheKey = 'test-cache-key ' ;
501
508
$ this ->command ->setRequestCache ($ requestCache );
502
509
$ this ->assertEquals ('run result ' , $ this ->command ->execute ());
0 commit comments