title: Laravel base_path() gives error - Call to undefined method baseDir()
body: <p>I have a tester class and I'm trying to use the global helper method <code>base_path()</code>, but I get the error below: </p>
  
  <pre><code>Error: Call to undefined method Illuminate\Container\Container::basePath()
  /myproject/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php:182
  /myproject/tests/Feature/DataCsvSeedTest.php:31
  /myproject/vendor/phpunit/phpunit/src/TextUI/Command.php:195
  /myproject/vendor/phpunit/phpunit/src/TextUI/Command.php:148
  </code></pre>
  
  <p>Looks like helper.php in Laravel calls basePath(), and can't find it. Am I missing a namespace or some other setting for the global helper functions? Using Laravel 5.5.</p>
  
  <pre><code>&lt;?php    
  namespace Tests\Feature;
  use Tests\TestCase;
  
  class DataCsvSeedTest extends TestCase
  {
     public function setUp()
     {
      $baseDir = base_path();
      print "basedir = ". $baseDir;
     }
  }
  </code></pre>