コード例 #1
0
ファイル: LiveCodeTest.php プロジェクト: relue/magento2
 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}'.");
 }
コード例 #2
0
ファイル: CommandTest.php プロジェクト: nemphys/magento2
 /**
  * @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());
 }