title: Can PHPUnit temporarily reset system paths before a run?
body: <p>I'm using <a href="https://github.com/OpenBuildings/phpunit-spiderling" rel="nofollow">phpunit-spiderling</a> alongside PHPUnit to run browser/functional tests on PhantomJS, installed via <a href="https://github.com/jonnnnyw/php-phantomjs" rel="nofollow">jonnyw/php-phantomjs</a>, which in turn installs the <code>phantomjs</code> binary in <code>&lt;project&gt;/bin</code>. Since that folder is not in the system path, I need to start tests thus:</p>
  
  <pre><code>PATH=$PATH:`pwd`/bin ./phpunit test/browser/tests
  </code></pre>
  
  <p>This works fine, but I expect I'll need to condense it into the raw command when I set this up on hosted CI, without the environment prefix:</p>
  
  <pre><code>./phpunit test/browser/tests
  </code></pre>
  
  <p>I've tried a <code>--bootstrap</code> command to run a <code>system()</code> command to reset the system path, to no avail, and I can't see anything in the manual that describes how to do this via <code>phpunit.xml</code>. Unfortunately Spiderling hard-wires the Phantom command, and it is expected to be visible in the system path.</p>
  
  <p>I've also tried doing this is a <code>setUp()</code> test method, but that's too late - Spiderling will already have tried, and failed, to start up PhantomJS on a random port.</p>
  
  <p>(The command <code>./phpunit</code> is just a symlink to <code>vendor/phpunit/phpunit/phpunit</code>, which is PHPUnit installed via Composer.)</p>