| @@ 460-469 (lines=10) @@ | ||
| 457 | $result = $this->cache->getMultiple(['key1', $key, 'key2']); |
|
| 458 | } |
|
| 459 | ||
| 460 | public function testGetMultipleNoIterable() |
|
| 461 | { |
|
| 462 | $this->expectException(InvalidArgumentException::class); |
|
| 463 | ||
| 464 | if (isset($this->skippedTests[__FUNCTION__])) { |
|
| 465 | $this->markTestSkipped($this->skippedTests[__FUNCTION__]); |
|
| 466 | } |
|
| 467 | ||
| 468 | $result = $this->cache->getMultiple('key'); |
|
| 469 | } |
|
| 470 | ||
| 471 | /** |
|
| 472 | * @dataProvider invalidKeys |
|
| @@ 474-483 (lines=10) @@ | ||
| 471 | /** |
|
| 472 | * @dataProvider invalidKeys |
|
| 473 | */ |
|
| 474 | public function testSetInvalidKeys($key) |
|
| 475 | { |
|
| 476 | $this->expectException(InvalidArgumentException::class); |
|
| 477 | ||
| 478 | if (isset($this->skippedTests[__FUNCTION__])) { |
|
| 479 | $this->markTestSkipped($this->skippedTests[__FUNCTION__]); |
|
| 480 | } |
|
| 481 | ||
| 482 | $this->cache->set($key, 'foobar'); |
|
| 483 | } |
|
| 484 | ||
| 485 | /** |
|
| 486 | * @dataProvider invalidArrayKeys |
|
| @@ 572-581 (lines=10) @@ | ||
| 569 | /** |
|
| 570 | * @dataProvider invalidTtl |
|
| 571 | */ |
|
| 572 | public function testSetInvalidTtl($ttl) |
|
| 573 | { |
|
| 574 | $this->expectException(InvalidArgumentException::class); |
|
| 575 | ||
| 576 | if (isset($this->skippedTests[__FUNCTION__])) { |
|
| 577 | $this->markTestSkipped($this->skippedTests[__FUNCTION__]); |
|
| 578 | } |
|
| 579 | ||
| 580 | $this->cache->set('key', 'value', $ttl); |
|
| 581 | } |
|
| 582 | ||
| 583 | /** |
|
| 584 | * @dataProvider invalidTtl |
|
| @@ 586-595 (lines=10) @@ | ||
| 583 | /** |
|
| 584 | * @dataProvider invalidTtl |
|
| 585 | */ |
|
| 586 | public function testSetMultipleInvalidTtl($ttl) |
|
| 587 | { |
|
| 588 | $this->expectException(InvalidArgumentException::class); |
|
| 589 | ||
| 590 | if (isset($this->skippedTests[__FUNCTION__])) { |
|
| 591 | $this->markTestSkipped($this->skippedTests[__FUNCTION__]); |
|
| 592 | } |
|
| 593 | ||
| 594 | $this->cache->setMultiple(['key' => 'value'], $ttl); |
|
| 595 | } |
|
| 596 | ||
| 597 | public function testNullOverwrite() |
|
| 598 | { |
|
| @@ 705-713 (lines=9) @@ | ||
| 702 | /** |
|
| 703 | * @dataProvider validKeys |
|
| 704 | */ |
|
| 705 | public function testSetValidKeys($key) |
|
| 706 | { |
|
| 707 | if (isset($this->skippedTests[__FUNCTION__])) { |
|
| 708 | $this->markTestSkipped($this->skippedTests[__FUNCTION__]); |
|
| 709 | } |
|
| 710 | ||
| 711 | $this->cache->set($key, 'foobar'); |
|
| 712 | $this->assertEquals('foobar', $this->cache->get($key)); |
|
| 713 | } |
|
| 714 | ||
| 715 | /** |
|
| 716 | * @dataProvider validKeys |
|
| @@ 738-746 (lines=9) @@ | ||
| 735 | /** |
|
| 736 | * @dataProvider validData |
|
| 737 | */ |
|
| 738 | public function testSetValidData($data) |
|
| 739 | { |
|
| 740 | if (isset($this->skippedTests[__FUNCTION__])) { |
|
| 741 | $this->markTestSkipped($this->skippedTests[__FUNCTION__]); |
|
| 742 | } |
|
| 743 | ||
| 744 | $this->cache->set('key', $data); |
|
| 745 | $this->assertEquals($data, $this->cache->get('key')); |
|
| 746 | } |
|
| 747 | ||
| 748 | /** |
|
| 749 | * @dataProvider validData |
|