public function testCopyPaste() { $reportFile = self::$_reportDir . '/phpcpd_report.xml'; $cmd = new Inspection_CopyPasteDetector_Command($reportFile); if (!$cmd->canRun()) { $this->markTestSkipped('PHP Copy/Paste Detector command line is not available.'); } $this->assertTrue($cmd->run(self::$_whiteList, self::$_blackList), "See detailed report in '{$reportFile}'."); }
/** * @dataProvider canRunDataProvider */ public function testCanRun($cmdOutput, $expectedResult) { $this->_cmd->expects($this->once())->method('_execShellCmd')->with($this->stringContains('phpcpd'))->will($this->returnValue($cmdOutput)); $this->assertEquals($expectedResult, $this->_cmd->canRun()); }