title: Unit Testing in Laravel: Error when setting the Currently Authenticated User
body: <p>In my Unit Test in Laravel I am setting the currently authenticated user with the code below.  This is exactly how Laravel documented it on their website. I use the default User model which Laravel provide.</p>
  
  <pre><code>public function testLoggedInUserCanCreateCat() {
          Route::enableFilters();
          $user = new User(array(
              'name' =&gt; 'john'
          ));
          $this-&gt;be($user);
          $this-&gt;call('GET', '/cats/create');
          $this-&gt;assertResponseOk();
      }
  </code></pre>
  
  <p>For some reason, when I run <em>phpunit</em> in SSH, I get the following error:</p>
  
  <pre><code>1) GlobalTest::testLoggedInUserCanCreateCat
  Illuminate\Database\Eloquent\MassAssignmentException: name
  </code></pre>
  
  <p>Does anyone know whats goes wrong here? I searched for a couple of hours on the internet, but couldn't find any help..</p>