michal-kocarek / PhpOnWindows

Bridge to PHP installed in Bash on Ubuntu on Windows
MIT License
76 stars 15 forks source link

PHPUnit fails if execute separate test method #5

Open ruslan-pelepets opened 7 years ago

ruslan-pelepets commented 7 years ago

Possible solution is to add quotes for param --filter in php-bridge.php:

unset($argument);

// For PHPUnit
for($i = 0; $i < count($arguments); $i++) {
    if($arguments[$i] == '--filter' && isset($arguments[$i+1])) {
        $arguments[$i+1] = "'" . $arguments[$i+1] . "'";
        break;
    }
}

dbg('Linux arguments: ' . implode(' ', $arguments));