]> BookStack Code Mirror - bookstack/blobdiff - tests/ThemeTest.php
Updated code view block line highlighting to only show on focus
[bookstack] / tests / ThemeTest.php
index efab53379f3d72a83d5af45d7fe4aa47de51b2d1..bc8163056f345bf1dbf25da6a526bf6aafbb9662 100644 (file)
@@ -19,11 +19,12 @@ use Illuminate\Support\Facades\Artisan;
 use Illuminate\Support\Facades\File;
 use Illuminate\Support\Facades\Http;
 use League\CommonMark\ConfigurableEnvironmentInterface;
+use League\CommonMark\Environment\Environment;
 
 class ThemeTest extends TestCase
 {
-    protected $themeFolderName;
-    protected $themeFolderPath;
+    protected string $themeFolderName;
+    protected string $themeFolderPath;
 
     public function test_translation_text_can_be_overridden_via_theme()
     {
@@ -36,7 +37,7 @@ class ThemeTest extends TestCase
         ';
             file_put_contents($translationPath . '/entities.php', $customTranslations);
 
-            $homeRequest = $this->actingAs($this->getViewer())->get('/');
+            $homeRequest = $this->actingAs($this->users->viewer())->get('/');
             $this->withHtml($homeRequest)->assertElementContains('header nav', 'Sandwiches');
         });
     }
@@ -57,7 +58,7 @@ class ThemeTest extends TestCase
     {
         $callbackCalled = false;
         $callback = function ($environment) use (&$callbackCalled) {
-            $this->assertInstanceOf(ConfigurableEnvironmentInterface::class, $environment);
+            $this->assertInstanceOf(Environment::class, $environment);
             $callbackCalled = true;
 
             return $environment;