title: Trait not found inside Laravel 5 unit tests
body: <p>I'm writing some unit tests to test the API endpoints in my Laravel 5 application, and a lot of endpoints require user authentication. Instead of having the same user account creation code in every test, I wanted to define a <code>RegistersUsers</code> trait to use on the test classes, which will have a <code>registerUser()</code> method.</p>
  
  <p>The directory structure of my <code>tests</code> directory is like so:</p>
  
  <pre><code>/tests
      /Traits
          RegistersUsers.php
      TestCase.php
      UserTest.php
  </code></pre>
  
  <p>I've namespaced <code>TestCase.php</code> and <code>UserTest.php</code> by adding this namespace declaration:</p>
  
  <pre><code>namespace MyappTests;
  </code></pre>
  
  <p>and I've namespaced <code>RegistersUsers.php</code> like so:</p>
  
  <pre><code>namespace MyappTests\Traits;
  </code></pre>
  
  <p>My <code>UserTest</code> looks like this, with the namespace and the <code>use</code> declaration so that I can leverage <code>RegistersUsers</code>.</p>
  
  <pre><code>&lt;?php
  
  namespace MyappTests;
  
  use MyappTests\Traits\RegistersUsers;
  
  class UserTest extends TestCase
  {
      use RegistersUsers;
  
      // ... rest of the class
  </code></pre>
  
  <p>However, when I run the test, PHPUnit dies with the fatal error:</p>
  
  <blockquote>
    <p>Trait 'MyappTests\Traits\RegistersUsers' not found in /home/vagrant/demo-app-net/tests/UserTest.php on line 9</p>
  </blockquote>
  
  <p>As far as I can tell, my namespacing is correct and my trait should be found. I've been going around in circles with this and can't seem to figure it out.</p>