3 use Illuminate\Foundation\Testing\DatabaseTransactions;
5 class TestCase extends Illuminate\Foundation\Testing\TestCase
8 use DatabaseTransactions;
11 * The base URL to use while testing the application.
15 protected $baseUrl = 'http://localhost';
19 * Creates the application.
21 * @return \Illuminate\Foundation\Application
23 public function createApplication()
25 $app = require __DIR__.'/../bootstrap/app.php';
27 $app->make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();
32 public function asAdmin()
34 if($this->admin === null) {
35 $this->admin = \BookStack\User::find(1);
37 return $this->actingAs($this->admin);