Code Duplication    Length = 10-11 lines in 3 locations

tests/SimpleCacheTest.php 3 locations

@@ 252-261 (lines=10) @@
249
        $this->assertEquals('value1', $this->cache->get('key1'));
250
    }
251
252
    public function testSetMultipleWithIntegerArrayKey()
253
    {
254
        if (isset($this->skippedTests[__FUNCTION__])) {
255
            $this->markTestSkipped($this->skippedTests[__FUNCTION__]);
256
        }
257
258
        $result = $this->cache->setMultiple(['0' => 'value0']);
259
        $this->assertTrue($result, 'setMultiple() must return true if success');
260
        $this->assertEquals('value0', $this->cache->get('0'));
261
    }
262
263
    public function testSetMultipleTtl()
264
    {
@@ 609-619 (lines=11) @@
606
        $this->assertNull($this->cache->get('key'), 'Setting null to a key must overwrite previous value');
607
    }
608
609
    public function testDataTypeString()
610
    {
611
        if (isset($this->skippedTests[__FUNCTION__])) {
612
            $this->markTestSkipped($this->skippedTests[__FUNCTION__]);
613
        }
614
615
        $this->cache->set('key', '5');
616
        $result = $this->cache->get('key');
617
        $this->assertTrue('5' === $result, 'Wrong data type. If we store a string we must get an string back.');
618
        $this->assertTrue(is_string($result), 'Wrong data type. If we store a string we must get an string back.');
619
    }
620
621
    public function testDataTypeInteger()
622
    {
@@ 621-631 (lines=11) @@
618
        $this->assertTrue(is_string($result), 'Wrong data type. If we store a string we must get an string back.');
619
    }
620
621
    public function testDataTypeInteger()
622
    {
623
        if (isset($this->skippedTests[__FUNCTION__])) {
624
            $this->markTestSkipped($this->skippedTests[__FUNCTION__]);
625
        }
626
627
        $this->cache->set('key', 5);
628
        $result = $this->cache->get('key');
629
        $this->assertTrue(5 === $result, 'Wrong data type. If we store an int we must get an int back.');
630
        $this->assertTrue(is_int($result), 'Wrong data type. If we store an int we must get an int back.');
631
    }
632
633
    public function testDataTypeFloat()
634
    {