Code Duplication    Length = 9-10 lines in 2 locations

Tests/Cache/CacheTest.php 2 locations

@@ 369-378 (lines=10) @@
366
    /**
367
     * Test that array has keys.
368
     */
369
    public function testArrayHasKeys(){
370
        $data = ['a' => 'foo', 'b' => 'bar'];
371
372
        $reflector = new \ReflectionClass(Cache::class);
373
        $method = $reflector->getMethod('_hasKeys');
374
        $method->setAccessible(true);
375
        $actual = $method->invokeArgs($this->cache, [$data]);
376
377
        $this->assertEquals(true, $actual);
378
    }
379
380
    /**
381
     * Test exception thrown when array is missing keys.
@@ 421-429 (lines=9) @@
418
    /**
419
     * Test that array is Traversable
420
     */
421
    public function testIsTraversable(){
422
        $data = ['a','b','c','d'];
423
        $reflector = new \ReflectionClass(Cache::class);
424
        $method = $reflector->getMethod('_isTraversable');
425
        $method->setAccessible(true);
426
        $actual = $method->invokeArgs($this->cache, [$data]);
427
        $expected = true;
428
        $this->assertEquals($expected, $actual);
429
    }
430
431
    /**
432
     * Test that string is not Traversable