Page MenuHomePhabricator

XUnitTestEngine does not handle properly whitespaces in runner's path
Open, Needs TriagePublic

Description

XUnitTestEngine produces a command line which does not work if full path of runner contains whitespaces.

Here is a patch for src/unit/engine/XUnitTestEngine.php:

  $xunit = $this->projectRoot.DIRECTORY_SEPARATOR.$this->xunitHintPath;
  if (file_exists($xunit) && $this->xunitHintPath !== null) {
-    $this->testEngine = Filesystem::resolvePath($xunit);
+    $this->testEngine = '"'.Filesystem::resolvePath($xunit).'"';
  } else if (Filesystem::binaryExists('xunit.console.clr4.exe')) {
    $this->testEngine = 'xunit.console.clr4.exe';