Code Duplication    Length = 8-10 lines in 2 locations

tests/unit/IO/StreamReaderTest.php 2 locations

@@ 57-64 (lines=8) @@
54
        static::assertSame($iterator, $actual);
55
    }
56
57
    public function testFetchAllWithNoCallable()
58
    {
59
        $iterator = new ArrayIterator(['some', 'text']);
60
        $reader = $this->buildReader("some text in a stream", $iterator);
61
62
        $actual = $reader->fetchAll();
63
        static::assertEquals(['some', 'text'], $actual);
64
    }
65
66
    public function testFetchWithCallable()
67
    {
@@ 80-89 (lines=10) @@
77
        static::assertEquals(['some'], $result);
78
    }
79
80
    public function testFetchAllWithCallable()
81
    {
82
        $iterator = new ArrayIterator(['some', 'text']);
83
        $reader = $this->buildReader("some text in a stream", $iterator);
84
85
        $actual = $reader->fetchAll(function ($item) {
86
            return $item == 'text';
87
        });
88
        static::assertEquals(['text'], array_values($actual));
89
    }
90
}
91