]> BookStack Code Mirror - bookstack/blobdiff - tests/TestCase.php
Upgraded to Laravel 5.4
[bookstack] / tests / TestCase.php
index 67a18777a459dee89898dd526e3e06d2e38cdf3e..e0455f44712cd424c2ddea4d8f5dd670251c516f 100644 (file)
@@ -1,6 +1,7 @@
 <?php
 
 use Illuminate\Foundation\Testing\DatabaseTransactions;
+use Symfony\Component\DomCrawler\Crawler;
 
 class TestCase extends Illuminate\Foundation\Testing\TestCase
 {
@@ -8,12 +9,11 @@ class TestCase extends Illuminate\Foundation\Testing\TestCase
     use DatabaseTransactions;
 
     /**
-     * The base URL to use while testing the application.
+     * The base URL of the application.
      *
      * @var string
      */
-    protected $baseUrl = 'http://localhost';
-    private $admin;
+    public $baseUrl = 'http://localhost';
 
     /**
      * Creates the application.
@@ -24,16 +24,8 @@ class TestCase extends Illuminate\Foundation\Testing\TestCase
     {
         $app = require __DIR__.'/../bootstrap/app.php';
 
-        $app->make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();
+        $app->make(Kernel::class)->bootstrap();
 
         return $app;
     }
-
-    public function asAdmin()
-    {
-        if($this->admin === null) {
-            $this->admin = \BookStack\User::find(1);
-        }
-        return $this->actingAs($this->admin);
-    }
 }