title: PhpStorm via phpunit.phar - Warning: require_once(PHPUnit/Runner/Version.php)
body: <ol>
  <li>I have downloaded phpunit.phar from official website <a href="https://phar.phpunit.de/phpunit.phar" rel="nofollow noreferrer">https://phar.phpunit.de/phpunit.phar</a>
  v4.6</li>
  </ol>
  
  <p>PhpStorm v8.0.3 (PS-139.1348, February 12, 2015)</p>
  
  <ol start="2">
  <li>Configured phpunit settings in PhpStorm. Set "Path to phpunit.phar".</li>
  </ol>
  
  <p><img src="https://i.stack.imgur.com/chB9H.png" alt="config"></p>
  
  <ol start="3">
  <li>I created simplest unittest to test if it is working and run test in PhpStorm</li>
  </ol>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;?php
  
  class MyTest extends PHPUnit_Framework_TestCase
  {
      public function testOneEqualsOne()
      {
          $this-&gt;assertEquals(1, 1);
      }
  }
  
  ?&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Configured unit test to run in PhpStorm</p>
  
  <p><img src="https://i.stack.imgur.com/KMRjv.png" alt="set unit test"></p>
  
  <p>And run test in PhpStorm</p>
  
  <p><img src="https://i.stack.imgur.com/JmVfg.png" alt="test"></p>
  
  <p>I got error:</p>
  
  <pre><code>Warning: require_once(PHPUnit/Runner/Version.php): failed to open stream: No such file or directory in C:\Users\Mike\AppData\Local\Temp\ide-phpunit.php on line 49
  
  Call Stack:
      0.0000     372768   1. {main}() C:\Users\Mike\AppData\Local\Temp\ide-phpunit.php:0
      0.0000     373120   2. IDE_PHPUnit_Loader::init() C:\Users\Mike\AppData\Local\Temp\ide-phpunit.php:209
      0.0120     630736   3. IDE_PHPUnit_Loader::detectPHPUnitVersionId() C:\Users\Mike\AppData\Local\Temp\ide-phpunit.php:196
  
  
  Fatal error: require_once(): Failed opening required 'PHPUnit/Runner/Version.php' (include_path='.;C:\wamp\bin\php\php5.5.12\pear') in C:\Users\Mike\AppData\Local\Temp\ide-phpunit.php on line 49
  
  Call Stack:
      0.0000     372768   1. {main}() C:\Users\Mike\AppData\Local\Temp\ide-phpunit.php:0
      0.0000     373120   2. IDE_PHPUnit_Loader::init() C:\Users\Mike\AppData\Local\Temp\ide-phpunit.php:209
      0.0120     630736   3. IDE_PHPUnit_Loader::detectPHPUnitVersionId() C:\Users\Mike\AppData\Local\Temp\ide-phpunit.php:196
  
  
  Process finished with exit code 255
  </code></pre>
  
  <p>When I run test via CMD, everything is ok. </p>
  
  <p><img src="https://i.stack.imgur.com/L3xEW.png" alt="cmd"></p>
  
  <p><strong>Question: How to setup PhpUnit via phpunit.phar to get it work?</strong></p>