예제 #1
0
 public function testCodeMess()
 {
     $reportFile = self::$_reportDir . '/phpmd_report.xml';
     $codeMessDetector = new CodingStandard_Tool_CodeMessDetector(realpath(__DIR__ . '/_files/phpmd/ruleset.xml'), $reportFile);
     if (!$codeMessDetector->canRun()) {
         $this->markTestSkipped('PHP Mess Detector is not available.');
     }
     $this->assertEquals(PHP_PMD_TextUI_Command::EXIT_SUCCESS, $codeMessDetector->run(self::$_whiteList, self::$_blackList), "PHP Code Mess has found error(s): See detailed report in {$reportFile}");
 }
예제 #2
0
 public function testCanRun()
 {
     $messDetector = new CodingStandard_Tool_CodeMessDetector('some/ruleset/file.xml', 'some/report/file.xml');
     $this->assertEquals(class_exists('PHP_PMD_TextUI_Command'), $messDetector->canRun());
 }