Replace some more "command -v" calls with the Helper method

Remove some more output mid-unittests on windows.

Second part from #12303 

@MorrisJobke @icewind1991 @LukasReschke 
It is :trollface:
http://php.net/manual/en/language.operators.comparison.php#language.operators.comparison.ternary