title: Configuration PHPUnit with phpt
body: <p>I'm totally stucked. At first my code:</p>
  
  <p>File <em>sample000.phpt</em></p>
  
  <pre><code>--TEST--
  Basic test
  --DESCRIPTION--
  Lowlevel basic test
  --FILE--
  &lt;?php
  echo 'Hello World!';
  ?&gt;
  --EXPECT--
  Hello World!
  </code></pre>
  
  <p>File <em>PhptTestCase.php</em></p>
  
  <pre><code>&lt;?php
  require_once 'PHPUnit/Extensions/PhptTestCase.php';
  
  class PhptTestCase extends PHPUnit_Extensions_PhptTestCase
  {
      public $result;
  
      public function __construct( $file ) {
          $options = array( 'include_path' =&gt; 'D:\\xampp\\php' );
          parent::__construct( $file, $options );
      }
  
  }
  </code></pre>
  
  <p>File <em>phptTest.php</em></p>
  
  <pre><code>&lt;?php
  class PhptTest extends PHPUnit_Framework_TestCase
  {
      public $object;
  
      public function setUp() {}
      public function tearDown() {}
  
      public function testAll() {
          require_once 'phptTestCase.php';
  
          $file = __DIR__ . '/phpt-tests/sample000.phpt';
  
          $phpt = new PhptTestCase( $file );
          $result = $phpt-&gt;run();
          $this-&gt;assertTrue( $result-&gt;wasSuccessful() );
  
          var_dump( $result-&gt;failures() );
  
      }
  }
  </code></pre>
  
  <p>Running <code>pear run-tests sample000.phpt</code> from the command line work fine. Running <code>phpunit PhptTest.php</code> will always fail.</p>
  
  <p>After some research I dumped the result  with <code>var_dump( $result-&gt;failures() );</code> and see that the php executable couldn't be found:</p>
  
  <pre><code>array(1) {
    [0] =&gt;
    class PHPUnit_Framework_TestFailure#441 (2) {
      protected $failedTest =&gt;
      class PhptTestCase#434 (3) {
        public $result =&gt;
        NULL
        protected $filename =&gt;
        string(84) "D:\\htdocs\\[...]\\phpt/phpt-tests/sample000.phpt"
        protected $options =&gt;
        array(1) {
          ...
        }
      }
      protected $thrownException =&gt;
      class PHPUnit_Framework_ComparisonFailure#440 (12) {
        protected $expected =&gt;
        string(12) "Hello World!"
        protected $actual =&gt;
        string(94) "Der Befehl "C:\\php\\php.exe" ist entweder falsch geschrieben oder\nkonnte nicht gefunden werden."
  &lt;-- snip --&gt;
        protected $file =&gt;
        string(53) "D:\\xampp\\php\\pear\\PHPUnit\\Extensions\\PhptTestCase.php"
        protected $line =&gt;
        int(209)
        private $trace =&gt;
        array(17) {
          ...
        }
        private $previous =&gt;
        NULL
      }
    }
  }
  </code></pre>
  
  <p>I assume this is the line why the test fails when it runs with PHPUnit:<br>
  <em>Der Befehl "C:\php\php.exe" ist entweder falsch geschrieben oder\nkonnte nicht gefunden werden.</em><br>
  translated: <em>The "C: \ php \ php.exe" command is either misspelled or could not be found.</em> My php executable is installes in <code>D:/xampp/php</code></p>
  
  <p>I try to setup the include path in XML configuration file for PHPUnit (<code>phpunit.xml</code>) and also try to pass the include path as option to the class <code>PHPUnit_Extensions_PhptTestCase</code>.</p>
  
  <p>Can anybody tell me how to configure PHPUnit so it can find the php executable?</p>