/** * @dataProvider listOfFiles * @param $filename */ public function testFlawDetectorGivesBackMessages($filename) { $code = file_get_contents(STUBPATH . $filename); $ast = $this->getParser()->parse($code); $result = $this->flawDetector->analyze($ast); $this->assertArrayOf(AnalysisException::class, $result); }
/** * @param $ast * @param array $data * @return Issue[] */ protected function getIssues($ast, array $data) { $exceptions = $this->flawDetector->analyze($ast); $issues = $this->messageProvider->translateExceptions($exceptions); return $issues; }