public function testReadByParameters() { $logReaderService = new LogReaderService(); $regularExpression = '/\\s200\\s/'; $logReaderService->setRegularExpression($regularExpression); $limitOffset = 0; $logReaderService->setLimitOffset($limitOffset); $limitRows = 10; $logReaderService->setLimitRows($limitRows); $realPath = 'home/user/logs/access.log'; $logReaderService->setRealPath(vfsStream::url($realPath)); $logReaderService->setFile(new \SplFileObject($logReaderService->getRealPath())); $this->assertEquals($limitRows, substr_count($logReaderService->getContent(), PHP_EOL)); }