title: Laravel testing, no such table, sqlite
body: <p>I am running Laravel, on OS X using MAMP, and I am trying to do some unit testing, using PHPUnit, and sqlite, however when I run my tests, I get the error</p>
  
  <blockquote>
    <p>General error: 1 no such table: users</p>
  </blockquote>
  
  <p>I've tried running the artisan, to manually migrate the database, using the --env=testing, which runs fine, however I still get the error. I even call <code>Artisan::call('migrate');</code> in the SetUp method.</p>
  
  <p>/app/config/testing/database.php</p>
  
  <pre><code>return [
      'default' =&gt; 'sqlite',
  
      'connections' =&gt; [
          'sqlite' =&gt; [
              'driver'   =&gt; 'sqlite',
              'database' =&gt; ':memory:',
              'prefix'   =&gt; ''
          ],
      ]
  ];
  </code></pre>
  
  <p><strong>EDIT:</strong>
  Migration file:</p>
  
  <pre><code>Schema::create('users', function($table) {
      $table-&gt;increments('id');
      $table-&gt;string('email', 32)-&gt;unique();
      $table-&gt;string('password', 64);
      $table-&gt;string('username', 32)-&gt;unique();
      $table-&gt;dateTime('birthdate');
      $table-&gt;enum('status', array('ACTIVE', 'INACTIVE'));
      $table-&gt;timestamps();
  });
  
  Schema::create('roles', function($table) {
      $table-&gt;increments('id');
      $table-&gt;string('name', 32);
  });
  
  Schema::create('role_user', function ($table) {
      $table-&gt;increments('id');
  
      $table-&gt;unsignedInteger('user_id');
      $table-&gt;unsignedInteger('role_id');
  
      $table-&gt;foreign('user_id')-&gt;references('id')-&gt;on('users');
      $table-&gt;foreign('role_id')-&gt;references('id')-&gt;on('roles');
  
  });
  </code></pre>