public function testCodeStyle() { $reportFile = self::$_reportDir . '/phpcs_report.xml'; $cmd = new Inspection_CodeSniffer_Command(realpath(__DIR__ . '/_files/phpcs'), $reportFile); if (!$cmd->canRun()) { $this->markTestSkipped('PHP Code Sniffer command is not available.'); } $cmd->setExtensions(array('php', 'phtml')); $this->assertTrue($cmd->run(self::$_whiteList, self::$_blackList), "See detailed report in '{$reportFile}'."); }
/** * @depends testRun */ public function testRunWithExtensions() { $this->assertSame($this->_cmd, $this->_cmd->setExtensions(array('txt', 'xml'))); $this->_cmd->expects($this->once())->method('_execShellCmd')->with($this->stringContains(' --extensions=txt,xml ')); $this->_cmd->run(array()); }