MDL-34147 use cygwin style paths in phpunit hints
[moodle.git] / lib / phpunit / classes / hint_resultprinter.php
index 638b4d0..9e46811 100644 (file)
@@ -74,6 +74,12 @@ class Hint_ResultPrinter extends PHPUnit_TextUI_ResultPrinter {
             $file = substr($file, strlen($cwd)+1);
         }
 
             $file = substr($file, strlen($cwd)+1);
         }
 
-        $this->write("\nTo re-run:\n phpunit $testName $file\n");
+        $executable = 'phpunit';
+        if (phpunit_bootstrap_is_cygwin()) {
+            $file = str_replace('\\', '/', $file);
+            $executable = 'phpunit.bat';
+        }
+
+        $this->write("\nTo re-run:\n $executable $testName $file\n");
     }
 }
     }
 }