Exemplo n.º 1
0
 /**
  * @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);
 }
Exemplo n.º 2
0
 /**
  * @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;
 }