title: 'Class not found' when using namespaces in PHPUnit
body: <p>I'm new to PHPUnit and am having some trouble setting it up to access my PHP files. The directory structure I'm using for my app is this:</p>
  
  <pre><code>./phpunit.xml
  
  ./lib/Application/
    -&gt; Dir1/File1.php (namespace = Application\Dir1)
    -&gt; Dir1/File2.php
    -&gt; Dir2/File1.php (namespace = Application\Dir2)
  
  ./tests/Application/Tests
    -&gt; Test1.php (namespace = Application\Tests)
    -&gt; Test2.php 
  </code></pre>
  
  <p>In my PhpUnit.xml, I have:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;phpunit verbose="false"&gt;
    &lt;testsuites&gt;
        &lt;testsuite name="Application"&gt;
            &lt;directory&gt;./tests/Application/Tests&lt;/directory&gt;
        &lt;/testsuite&gt;
    &lt;/testsuites&gt;
    &lt;logging&gt;
         &lt;log type="coverage-text" target="php://stdout" showUncoveredFiles="false"/&gt;
         &lt;log type="json" target="/tmp/phpunit-logfile.json"/&gt;
    &lt;/logging&gt;
    &lt;filter&gt;
          &lt;whitelist&gt;
              &lt;directory suffix=".php"&gt;./lib&lt;/directory&gt;
          &lt;/whitelist&gt;
    &lt;/filter&gt;
  &lt;/phpunit&gt;
  </code></pre>
  
  <p>And in one of my test files, I open with:</p>
  
  <pre><code>namespace Application\Tests;
  
  use Application\Dir1\File1;
  
  class MyTest extends File1 {}
  </code></pre>
  
  <p>But it keeps on saying:</p>
  
  <blockquote>
    <p>Class 'Application\Dir1\File1' not found</p>
  </blockquote>
  
  <p>Where am I going wrong?</p>