예제 #1
0
 public function testRun()
 {
     $expectedQuoteChar = substr(escapeshellarg(' '), 0, 1);
     $expectedCmd = 'phpmd' . ' "some/test/dir with space,some/test/file with space.php"' . ' xml' . ' "some/ruleset/file.xml"' . ' --reportfile "some/report/file.xml"';
     $expectedCmd = str_replace('"', $expectedQuoteChar, $expectedCmd);
     $this->_cmd->expects($this->once())->method('_execShellCmd')->with($expectedCmd);
     $this->_cmd->run(array('some/test/dir with space', 'some/test/file with space.php'));
 }