/** * {@inheritdoc} */ protected function getFileHandler() { try { return parent::getFileHandler(); } catch (\MVar\LogParser\Exception\ParserException $exception) { throw new ParserException($exception->getMessage(), $exception->getCode(), $exception); } }
/** * Test for iterator in case of file handler exception. * * @expectedException \MVar\LogParser\Exception\ParserException * @expectedExceptionMessage Can not open log file */ public function testIteratorFileException() { $iterator = new LogIterator(__DIR__ . '/Fixtures/non_existing_file.log', $this->getParser()); $iterator->rewind(); }