Example #1
0
 public function testExceptionEmptyCatchBlockAnalyzer()
 {
     $this->project->addSplFileInfo(new \SplFileInfo(self::getAnalyzerFilename('009_empty_catch_block')));
     $this->project->addAnalyzer(new ExceptionEmptyCatch());
     $this->project->analyze();
     $reports = $this->project->getAnalyzerReports();
     $this->assertSame(2, count($reports));
     # Line counting starts with 0
     $this->assertSame(27, $reports[0]->getSourceFragment()->getLineSegment()->getHighlightLine());
     $this->assertSame(32, $reports[1]->getSourceFragment()->getLineSegment()->getHighlightLine());
 }