title: Custom PHPUnit Test Command in Netbeans
body: <p>I am trying to get Code coverage highlighting working in Netbeans with my CakePHP project.</p>
  
  <p>To run tests normally in CakePHP you execute the cake CLI tool like so:</p>
  
  <pre><code>cake test app AllModels
  </code></pre>
  
  <p>This command accepts all the normal phpunit parameters like <code>--coverage-clover</code> etc. 
  When ran, this command executes <code>Test/AllModelsTest.php</code> which contains a <code>AllModelsTest</code> which extends <code>PHPUnit_Framework_TestSuite</code>. Obviously by using the <code>cake</code> command, all prerequisites of the application are automatically loaded by Cake. This works completely fine from CLI and even from the web interface.</p>
  
  <p>The problem with running the unit tests from Netbeans, It seems the default behaviour in Netbeans is to pass the file directly to the PHPUnit command, which is failing as the first line of my test is a CakePHP method to autoload the model I'm testing: <code>App::uses('Inventory', 'Model');</code> - I've tried including the Model myself but then that itself extends another model and none of it is autoloading on its own.</p>
  
  <p><strong>Is there a way to adjust the command that Netbeans executes tests with?</strong></p>