@@ -429,7 +429,6 @@ public function testBasicUsageWithLongKey()
429429 }
430430
431431 /**
432- * @expectedException \Psr\SimpleCache\InvalidArgumentException
433432 * @dataProvider invalidKeys
434433 */
435434 public function testGetInvalidKeys ($ key )
@@ -438,11 +437,11 @@ public function testGetInvalidKeys($key)
438437 $ this ->markTestSkipped ($ this ->skippedTests [__FUNCTION__ ]);
439438 }
440439
440+ $ this ->expectException ('Psr\SimpleCache\InvalidArgumentException ' );
441441 $ this ->cache ->get ($ key );
442442 }
443443
444444 /**
445- * @expectedException \Psr\SimpleCache\InvalidArgumentException
446445 * @dataProvider invalidKeys
447446 */
448447 public function testGetMultipleInvalidKeys ($ key )
@@ -451,23 +450,21 @@ public function testGetMultipleInvalidKeys($key)
451450 $ this ->markTestSkipped ($ this ->skippedTests [__FUNCTION__ ]);
452451 }
453452
453+ $ this ->expectException ('Psr\SimpleCache\InvalidArgumentException ' );
454454 $ result = $ this ->cache ->getMultiple (['key1 ' , $ key , 'key2 ' ]);
455455 }
456456
457- /**
458- * @expectedException \Psr\SimpleCache\InvalidArgumentException
459- */
460457 public function testGetMultipleNoIterable ()
461458 {
462459 if (isset ($ this ->skippedTests [__FUNCTION__ ])) {
463460 $ this ->markTestSkipped ($ this ->skippedTests [__FUNCTION__ ]);
464461 }
465462
463+ $ this ->expectException ('Psr\SimpleCache\InvalidArgumentException ' );
466464 $ result = $ this ->cache ->getMultiple ('key ' );
467465 }
468466
469467 /**
470- * @expectedException \Psr\SimpleCache\InvalidArgumentException
471468 * @dataProvider invalidKeys
472469 */
473470 public function testSetInvalidKeys ($ key )
@@ -476,11 +473,11 @@ public function testSetInvalidKeys($key)
476473 $ this ->markTestSkipped ($ this ->skippedTests [__FUNCTION__ ]);
477474 }
478475
476+ $ this ->expectException ('Psr\SimpleCache\InvalidArgumentException ' );
479477 $ this ->cache ->set ($ key , 'foobar ' );
480478 }
481479
482480 /**
483- * @expectedException \Psr\SimpleCache\InvalidArgumentException
484481 * @dataProvider invalidArrayKeys
485482 */
486483 public function testSetMultipleInvalidKeys ($ key )
@@ -494,23 +491,21 @@ public function testSetMultipleInvalidKeys($key)
494491 yield $ key => 'bar ' ;
495492 yield 'key2 ' => 'baz ' ;
496493 };
494+ $ this ->expectException ('Psr\SimpleCache\InvalidArgumentException ' );
497495 $ this ->cache ->setMultiple ($ values ());
498496 }
499497
500- /**
501- * @expectedException \Psr\SimpleCache\InvalidArgumentException
502- */
503498 public function testSetMultipleNoIterable ()
504499 {
505500 if (isset ($ this ->skippedTests [__FUNCTION__ ])) {
506501 $ this ->markTestSkipped ($ this ->skippedTests [__FUNCTION__ ]);
507502 }
508503
504+ $ this ->expectException ('Psr\SimpleCache\InvalidArgumentException ' );
509505 $ this ->cache ->setMultiple ('key ' );
510506 }
511507
512508 /**
513- * @expectedException \Psr\SimpleCache\InvalidArgumentException
514509 * @dataProvider invalidKeys
515510 */
516511 public function testHasInvalidKeys ($ key )
@@ -519,11 +514,11 @@ public function testHasInvalidKeys($key)
519514 $ this ->markTestSkipped ($ this ->skippedTests [__FUNCTION__ ]);
520515 }
521516
517+ $ this ->expectException ('Psr\SimpleCache\InvalidArgumentException ' );
522518 $ this ->cache ->has ($ key );
523519 }
524520
525521 /**
526- * @expectedException \Psr\SimpleCache\InvalidArgumentException
527522 * @dataProvider invalidKeys
528523 */
529524 public function testDeleteInvalidKeys ($ key )
@@ -532,11 +527,11 @@ public function testDeleteInvalidKeys($key)
532527 $ this ->markTestSkipped ($ this ->skippedTests [__FUNCTION__ ]);
533528 }
534529
530+ $ this ->expectException ('Psr\SimpleCache\InvalidArgumentException ' );
535531 $ this ->cache ->delete ($ key );
536532 }
537533
538534 /**
539- * @expectedException \Psr\SimpleCache\InvalidArgumentException
540535 * @dataProvider invalidKeys
541536 */
542537 public function testDeleteMultipleInvalidKeys ($ key )
@@ -545,23 +540,21 @@ public function testDeleteMultipleInvalidKeys($key)
545540 $ this ->markTestSkipped ($ this ->skippedTests [__FUNCTION__ ]);
546541 }
547542
543+ $ this ->expectException ('Psr\SimpleCache\InvalidArgumentException ' );
548544 $ this ->cache ->deleteMultiple (['key1 ' , $ key , 'key2 ' ]);
549545 }
550546
551- /**
552- * @expectedException \Psr\SimpleCache\InvalidArgumentException
553- */
554547 public function testDeleteMultipleNoIterable ()
555548 {
556549 if (isset ($ this ->skippedTests [__FUNCTION__ ])) {
557550 $ this ->markTestSkipped ($ this ->skippedTests [__FUNCTION__ ]);
558551 }
559552
553+ $ this ->expectException ('Psr\SimpleCache\InvalidArgumentException ' );
560554 $ this ->cache ->deleteMultiple ('key ' );
561555 }
562556
563557 /**
564- * @expectedException \Psr\SimpleCache\InvalidArgumentException
565558 * @dataProvider invalidTtl
566559 */
567560 public function testSetInvalidTtl ($ ttl )
@@ -570,11 +563,11 @@ public function testSetInvalidTtl($ttl)
570563 $ this ->markTestSkipped ($ this ->skippedTests [__FUNCTION__ ]);
571564 }
572565
566+ $ this ->expectException ('Psr\SimpleCache\InvalidArgumentException ' );
573567 $ this ->cache ->set ('key ' , 'value ' , $ ttl );
574568 }
575569
576570 /**
577- * @expectedException \Psr\SimpleCache\InvalidArgumentException
578571 * @dataProvider invalidTtl
579572 */
580573 public function testSetMultipleInvalidTtl ($ ttl )
@@ -583,6 +576,7 @@ public function testSetMultipleInvalidTtl($ttl)
583576 $ this ->markTestSkipped ($ this ->skippedTests [__FUNCTION__ ]);
584577 }
585578
579+ $ this ->expectException ('Psr\SimpleCache\InvalidArgumentException ' );
586580 $ this ->cache ->setMultiple (['key ' => 'value ' ], $ ttl );
587581 }
588582
0 commit comments