title: How can I do unit and database testing on a Laravel 4 package?
body: <p>I am developing a package <a href="https://github.com/vjroby/laravel-nonce" rel="nofollow">link here</a> for Laravel 4.2. I want to write unit tests and database tests. As far I read I have to create an instance of Laravel app in order to use all the features in testing.</p>
  
  <p>I did a modification on <code>composer.json</code> and added the Laravel package like this</p>
  
  <pre><code> "require-dev": {
          "phpunit/phpunit" : "4.*",
          "laravel/laravel": "4.2.*"
      },
  </code></pre>
  
  <p>After <code>composer update</code> I created a TestCase class like the one from Laravel</p>
  
  <pre><code>public function createApplication()
      {
          $unitTesting = true;
          $testEnvironment = 'testing';
          return require __DIR__.'/../vendor/laravel/laravel/bootstrap/start.php';
      }
  </code></pre>
  
  <p>The issue is when doing a require in start.php I have an error with creating the framework with path 
  <code>./vjroby/laravel-nonce/vendor/laravel/laravel/vendor/laravel/framework/src</code></p>
  
  <p>because there is not such file, the file is in 
  <code>./vjroby/laravel-nonce/vendor/laravel/framework/src</code></p>