Code Duplication    Length = 8-8 lines in 2 locations

Tests/Cache/CacheTest.php 2 locations

@@ 383-390 (lines=8) @@
380
    /**
381
     * Test exception thrown when array is missing keys.
382
     */
383
    public function testArrayHasNoKeys(){
384
        $this->expectException(InvalidArgumentException::class);
385
        $data = ['foo','bar'];
386
        $reflector = new \ReflectionClass(Cache::class);
387
        $method = $reflector->getMethod('_hasKeys');
388
        $method->setAccessible(true);
389
        $method->invokeArgs($this->cache, [$data]);
390
    }
391
392
    /**
393
     * Test array contains a failure.
@@ 434-441 (lines=8) @@
431
    /**
432
     * Test that string is not Traversable
433
     */
434
    public function testIsNotTraversable(){
435
        $this->expectException(InvalidArgumentException::class);
436
        $data = 'some-random-string';
437
        $reflector = new \ReflectionClass(Cache::class);
438
        $method = $reflector->getMethod('_isTraversable');
439
        $method->setAccessible(true);
440
        $method->invokeArgs($this->cache, [$data]);
441
    }
442
443
    /**
444
     * Test that instance of Iterator is traversable